Poor wording in 14/16: Keys


#1

Hi,

I notice that the wording in this exercise:
https://www.codecademy.com/courses/react-101/lessons/react-jsx-advanced/exercises/jsx-keys?action=lesson_resume

states the following:
“If you don’t use keys when you’re supposed to, React might accidentally scramble your list-items into the wrong order.

soon after:
"If neither of these conditions are true, then you don’t have to worry about keys. If you aren’t sure then it never hurts to use them!"

As you can imagine someone new reading this for the first time might find that confusing.

Zakiir


#2

Hey buddy I just wanted to say that the last bit at the end is essentially saying “when in doubt use them” because it couldn’t hurt to organize your lists :wink:

But of course if the use-case is that its based on an UL collection of items, and it is not important how they rearrange then you can intentionally omit the extra code…


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.