Does that mean if i have a redux store attached to my app it rerenders everything when i change something small in the store? Because the store is usually one of the top most HOCs.
Does that mean if i have a redux store attached to my app it rerenders everything when i change something small in the store? Because the store is usually one of the top most HOCs.
Instead, components directly call `store.subscribe()`, and check to see if they need to update after each dispatched action.
See my post "A (Mostly) Complete Guide to React Rendering Behavior" for more details:
- https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-...
Look up Mark Erikson's blog[1], who's a Redux maintainer, for a lot of details on Redux's internals (acemarke on HN), he also answers tons of questions everywhere[2] about Redux, he helped me so much understand it!
[1] https://blog.isquaredsoftware.com/ [2] https://stackoverflow.com/a/40386189
<Context.Provider value={contextValue}>{children}</Context.Provider>
And `children` behave diferently. `children` is a prop and thus not considered as an element of the Provider component, but of the App component [2]. Meaning the components inside `children` will rerender when App renders, and not when Provider renders.
1: https://github.com/reduxjs/react-redux/blob/master/src/compo...
2: https://www.developerway.com/posts/react-elements-children-p...