The essence of React
In the words of Dan Abramov:
React wouldn't be React without: (1) render() is idempotent, (2) setState is the only way to re-render, (3) components all the way down.
— Dan Abramov (@dan_abramov) 2015, 6月 13
Take away (1), and there would be no hot reloading.
— Dan Abramov (@dan_abramov) 2015, 6月 13
Take away (2), and you can have two-way bindings, but no way to trace data and rendering mistakes.
— Dan Abramov (@dan_abramov) 2015, 6月 13
Take away (3) and you can have your HTML templates, but there would be no React Native.
— Dan Abramov (@dan_abramov) 2015, 6月 13
And not the essence of React:
But hey, at least you have “virtual DOM” on your homepage!
— Dan Abramov (@dan_abramov) 2015, 6月 13