News for hackers. Stuff that matters.
Re:React Concurrent Mode by tomduncalf on Thursday October 24, 2019 @04:47PM (#21348987)
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)
Re:React Concurrent Mode by AgentME on Thursday October 24, 2019 @06:44PM (#21349955)
Redux 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.)
Re:React Concurrent Mode by mosdl on Thursday October 24, 2019 @08:45PM (#21350689)
Redux still has to evaluate the selector each time since it has no clue if any of it's depedencies have changed.
Re:React Concurrent Mode by pault on Friday October 25, 2019 @01:19AM (#21352123)
That's why libraries like reselect use memoized selectors.
Re:React Concurrent Mode by PKop on Thursday October 24, 2019 @05:47PM (#21349541)
Isn't this exactly what hooks allows you to do?