React Context vs Redux
Count: 1
- Good for small projects
- Re-renders the entire application because of the state is defined in the main(App) component. This can be fixed with the help of React.memo
- Good for read not for write.
- Super easy to setup.
I am Memoized Context Component
Count: 1
- Perfect for big projects
- Re-renders only the subscribed component so its children. Children re-rendering can be fixed with the help of React.memo
- Work Flow : UI(Action Dispatched) -> Reducers (Calculating New State) -> State(Set New State) -> UI(Update UI) -> Cycle Repeat
- States (store) is defined seperately and not inside the main(App) component
- Lots of boilerplate
- PubSub Based
I am Memoized Redux Component