5 ms·
Perhaps I don’t fully understand your use case, but would something like MobX solve the problem you describe? Keep your data in stores, components automatically
by tomduncalf 7y ago
Perhaps I don’t fully understand your use case, but would something like MobX solve the problem you describe? Keep your data in stores, components automatically react to changes in them. You could do the same with Redux but MobX gives you finer-gained rerendering (only components who’s data has actually changed rerender)
- PKop 7y agoIsn't this exactly what hooks allows you to do?
- AgentME 7y agoRedux already has ways to do fine-grained rerendering. (That's why redux has you give selector callbacks that operate on the state instead of just exposing the whole redux state to components. Redux only re-renders the whole component when a selector callback returns a new value.)