3 ms·
> It means we define the UI in a declarative way based on the view state. If you define your state broad enough everything becomes a declarative/pure functions
by Spivak 4y ago
> It means we define the UI in a declarative way based on the view state.
If you define your state broad enough everything becomes a declarative/pure functions. That's not the point of interest, it's that React doesn't (and can't thanks partially to the DOM) handle view state super well. You can't make the complexity disappear so without using side-effects like useState/useEffect it lives either the model (current typed text) or the internal state of the DOM node (scroll position).