Login
Remember
Register
Ask a Question
What are the conditions to safely use the index as a key in ReactJS, explain with example?
0
votes
asked
Nov 4, 2023
in
ReactJS
by
AdilsonLima
What are the conditions to safely use the index as a key in ReactJS, explain with example?
reactjs-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Nov 4, 2023
by
AdilsonLima
There are three conditions to make sure, it is safe use the index as a key.
The list and items are static– they are not computed and do not change
The items in the list have no ids
The list is never reordered or filtered.
...