Jul 24, 2017 · 1 min read
..you might have missed the comment because of how crappily Medium comments operate, but TransitionGroup ended up doing it correctly after all.
So I’m in the process of updating the main sandbox and repos, but here are the 2 final solutions:
THE REDUCER WAY (isLoading reducer):
THE SELECTOR WAY (isLoading selector):
And the final answer is the selector. It means the reducers stay simpler, mapStatesToProps stays simpler, and funnily enough it automatically solves the race conditions that you’ll see I still had to solve in the reducer.
Also no additional setup dispatches are needed. And look how short the selector is compared to the reducer. This is basically what you were after.
