4 ms·
It really depends on what you do. If you use component state in high-level components and pass it around a lot, yes it will likely lead to hard to understand co
by alexanderchr 9y ago
It really depends on what you do. If you use component state in high-level components and pass it around a lot, yes it will likely lead to hard to understand code. But I see no issue with using state for state internal to low-level components, like an input field's value or whether a paragraph with a 'read more' button is expanded.
Of course, once you need to access a piece of state from outside that component you should probably move it to the store. But until then you are just creating unnecessary complexity by cluttering global state.