3 ms·
More specifically, to quote the Redux FAQ entry at http://redux.js.org/docs/faq/OrganizingState.html#organizing-state-only-redux-state http://redux.js.org/docs/
by acemarke 10y ago
More specifically, to quote the Redux FAQ entry at http://redux.js.org/docs/faq/OrganizingState.html#organizing-state-only-redux-state http://redux.js.org/docs/faq/OrganizingState.html#organizing... :
> There is no “right” answer for this. Some users prefer to keep every single piece of data in Redux, to maintain a fully serializable and controlled version of their application at all times. Others prefer to keep non-critical or UI state, such as “is this dropdown currently open”, inside a component's internal state.
> Using local component state is fine. As a developer, it is your job to determine what kinds of state make up your application, and where each piece of state should live. Find a balance that works for you, and go with it.
- boubiyeah 10y agoOh, this is milder than before. I had those tweets in mind: https://twitter.com/dan_abramov/status/725089775783391232?lang=en https://twitter.com/dan_abramov/status/725089775783391232?la... https://twitter.com/dan_abramov/status/759383530120110080?lang=en https://twitter.com/dan_abramov/status/759383530120110080?la... plus many other tweets. And that answer: https://github.com/reactjs/redux/issues/1287 https://github.com/reactjs/redux/issues/1287