C
C
ch-aqwer2018-02-12 12:28:36
JavaScript
ch-aqwer, 2018-02-12 12:28:36

Why does props change for everyone at once, and not for each separately, react / redux?

Good afternoon! Please tell me how to pass props so that they work only for one specific item-a?
Situation.
There is a main stateFull component index
, then there is a stateLess component - list, and in it there is already a stateLess component item.
I pass all props from index to item.
There is a props isLoading , which, when edited, takes a boolean value and, accordingly, the corresponding styles should be displayed in the item.
And so when I edit one item , this value changes for everyone.
I don't understand why and how to fix it properly.
isLoading I pass first to the List and then to the Item
I will be grateful for the help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2018-02-12
@ch-aqwer

isLoading - the state of the item component only? So store it in item )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question