12
wxcazee
4y

I feel like I'm too stupid to understand the Redux pattern. It makes me want to quit programming.

Comments
  • 1
    For the beginning i recommend this small series of youtube videos for react and redux ( with just redux in the first videos )
    https://m.youtube.com/watch/...
    As i started this was very helpful for fundamental understanding.
  • 1
    Yo, I felt the same about it. Until I joined an intern n worked with my team on a project. One of my teammates was developing on react redux, so basically I learned really quick from his result of 2 months intense learning of that.

    If u want, u can have a look a react redux boiler plate I made on github.com/capt4ce.
    Though it's not much, but hopefully it'll help.
    Also, u can contribute to that repo to make it more advance if u feel so 😄
  • 0
    Oh yeah, but I watch videos n tutorial about it first, but most of them r just barely scratching the surface. That's why I suggest u my boiler plate. I use that boiler plate as a starting of my projects too.
  • 1
    It's a big loop.

    • A component dispatches an action.
    • The action does whatever, and can dispatch other actions if you want.
    • The action returns a payload.
    • The reducer(s) for that action take the payload, merge it with / replace their previous state, and return a new copy.
    • The root reducer combines all states returned by reducers into the new application state.
    • Redux then injects this new state into your components.
    • The components then pick out any bits of state they care about (within mapStateToProps), and re-render if the data differs.

    It's a pretty large loop, but it's also pretty straightforward once you see how the whole thing works.

    Hope this helps! 😊
  • 1
    Hope I wont have this reaction while learning redux.
    I'm currently working on Mobx and it's easy to understand imo.
Add Comment