0

So, i usually make super-duper unique ids and keys for components that need it. But I wonder, how unique do they need to be? If they don't live in the same parent, is it important that they are different?

Please share you experience and thoughts :)

Sanne Wintrén
  • 359
  • 1
  • 4
  • 12

1 Answers1

0

No, it doesn't matter. I've done performance tests on it. The fact that it is in a unique div other than the component you gave the key is enough to distinguish it for the DOM.

hitmanche
  • 23
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 27 '22 at 00:52