3 ms·
The official Redux answer way is to use app state for everything. See libraries like https://github.com/erikras/redux-form https://github.com/erikras/redux-form
by acgourley 11y ago
The official Redux answer way is to use app state for everything. See libraries like https://github.com/erikras/redux-form https://github.com/erikras/redux-form which move all the field state into your app state. Personally I break that rule when I know I can. The only other state I can think of is animation state - but using css transition animations has just worked out for me so far.
- acemarke 11y agoActually, no, it's not. In fact, the Redux FAQ flat-out says "It's up to you to decide what state goes where": http://redux.js.org/docs/FAQ.html#organizing-state-only-redux-state http://redux.js.org/docs/FAQ.html#organizing-state-only-redu.... There's certainly some good reasons to put as much of your UI/app state into Redux as possible, but there's also entirely valid reasons why you might not want to put some state in there.