The Beginning

When I first started with redux this is what it looked like

Image for post

The near infinite setup; Over 60 types, dispatch after dispatch and an AI’s worth of state cases

And gosh was it a hassle! Switching between a dozen files to create new actions, setup new types and add new cases to the reducer just to manage one new piece of redux state! Then there’s dispatch! And then extra complexities when it comes to something as simple as routing to a new section of your app when you are dealing with an asynchronous function with an action. But if there is an easier way to handle all this, I may have just stumbled across it. So how then do we go from the spider web above, to this below

Image for post

#firebase #javascript #react-native

The Redux Shortcut; One Action, One Reducer, No Dispatch!
1.50 GEEK