About observing array changes #1904
-
What do you think, what is best practice to observe array changes? Because simple replacing array with new array not replacing reference. Also i think, that this moment should be crearly described in documentation, because most people stucked on this. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
There is not a silver bullet approach to this problem, as you would most likely approach it differently if it's a small array, if it's a large array, if you only want single elements to re-render on changes, if you are working with a React Native Do you have a code example where this is causing you trouble? |
Beta Was this translation helpful? Give feedback.
Hi @vladimirevstratov!
There is not a silver bullet approach to this problem, as you would most likely approach it differently if it's a small array, if it's a large array, if you only want single elements to re-render on changes, if you are working with a React Native
FlatList
, etc.Do you have a code example where this is causing you trouble?