Answer the question
In order to leave comments, you need to log in
How to make REACT-REDUX re-render only one element?
There is a parent element App. Through connect, he is subscribed to change the entire store.
There is a Todo element. He is also subscribed to change the entire store.
There can be multiple Todo items.
When one of the Todos fires an event, it causes the App and nested Todos (all) to be re-rendered.
How can I make sure that when an event is dispatched, only the Todo that sent it is updated?
All code on codepen
PS see console
Answer the question
In order to leave comments, you need to log in
Take a look at this React-Redux answer. Which way is correct: call connect ...
In short:
When the render method is called, this does not mean that the application will be re-rendered. The render method returns a Virtual DOM. The ReactJS engine takes the returned Virtual DOM object, compares it to the previous one, and makes incremental changes, if any.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question