javascript - Multiple Instances of the Same Component in React-Redux -
how can have multiple instances of same container component in react-redux? if send unique data each of component gets data of last component store updated using values. eg -
<containerinstance1 data={data1}/> <containerinstance2 data={data2}/>
container instance 1 data store modified container instance 2 while rendering. how use can data correctly?
it sounds have issues, possibly in reducer - data1 , data2 in fact same object.
make sure not mutating state, instead returning new state object reducers.
if 2 data objects above truely not same data object - there no reason why above shouldn't work think should. in other words, there isn't issue code above, rather somewhere else.
Comments
Post a Comment