React/Redux rendering a list that's updating every second

后端 未结 5 877
生来不讨喜
生来不讨喜 2021-02-01 06:44

I have a react component that receives props from the redux store every second. The new state has an array that\'s different than the last array. To be specific, every second an

5条回答
  •  广开言路
    2021-02-01 07:00

    it looks like you are creating a new array each time in the reducer in which all array indices need to be re-calculated. have you tried appending the new node to the end of the list instead of prepending?

提交回复
热议问题