3 ms·
This performance tip seems relevant to you: https://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate https://facebook.github.io
by acgourley 11y ago
This performance tip seems relevant to you: https://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate https://facebook.github.io/react/docs/component-specs.html#u...
- d0m 11y agoI'm already using immutable objects, this is a separate issue. The question is about how to keep the UIState (Say inside a component) in sync with the AppState considering they both evolve differently?
- acgourley 11y agoThe 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.