Oleksii Koshkin
1 min readOct 22, 2019

--

First, thank you for the article and the example, really nice work.

The only thing I’d like to add a bit more info about component’s update cycle. You mentioned it (`memo`), but IMHO more explicit example or explanation could be useful for non-experienced decelopers.

I mean, all the components that use the same context will be re-rendered on each action run (state change, context change) without special efforts like `memo` or other technic to calculate if particular change should affect the component. If state includes more than one logical filed, like

`

const initialState = {

todos: [],

value: 42

}

`

update of `value` redux-way — replacing whole state object — will lead to re-render `TodoList` component as well. This can have significant impact on performance in case of nested components, or even for siblings that use different parts of state.

--

--

Oleksii Koshkin
Oleksii Koshkin

Written by Oleksii Koshkin

AWS certified Solution Architect

No responses yet