James Gillmore
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.

James Gillmore

Written by

http://www.faceyspacey.com + http://twitter.com/faceyspacey

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade