Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Voxera82223yThebasic Idea behind react is that the current visible page is a function of the state and any changes start by changing the state.
Combine that with virtual dom that avoids unnecessary dom changes and rewrites.
This means that you build the html as if it was recreated from state every time instead of identifying how to modify it.
This makes it much more easy to not forget to change a thing.
As long as every part always render from state it just works.
Think of a list of tasks with a dropdown of all categories to filter.
If the dropdown is built from the list by pulling all categories and the list is built by looping and filtering.
If you add a new item to the lost in state both the visible list, the category selection and the counters would automatically get rerendered as state they depend on changes.
Takes a bit getting used to but I really love it :)