Amy Blankenship
1 min readJun 2, 2020

--

I started reading this article, but I admit I didn’t finish because I couldn’t get past the example you used, which shouldn’t ever happen when you’re using Redux. If you’re using Redux, then the purpose of actions is to kick off code that generates your side effects. And then when the call comes back, that then triggers your reducer to update your application state, which then comes into your component via its props (specifically, through mapDispatchToProps). So if your component is doing any of this internally, then you’re not using Redux as intended. That’s the reason the code got difficult to reason about. Still, I’ll keep this article in the back of my mind because there might be some detail here that could help me in a future situation that’s not related to the artificially complex example you used.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet