repetere/jsonx

Make render index optional by default

yawetse opened this issue · 0 comments

Conclusion - https://medium.com/@adhithiravi/why-do-i-need-keys-in-react-lists-dbb522188bbb
Let’s recap the highlights from this post.

  1. Lists are performant heavy and need to be used carefully.
  2. Make sure every item in the list has a unique key.
  3. It is prefered to not use indexes as a key unless you know for sure that the list is a static list (no additions/re-ordering/removal to the list).
  4. Never use unstable keys like Math.random() to generate a key.
  5. React will run into performance degradation and unexpected behaviour if unstable keys are used

.