Quiz
Lists & keys
10 questions
Rendering lists, the key prop, conditional rendering, and Fragments
01Why is it dangerous to use the array index as a key when the list can be reordered?
02What is the correct way to render a list of names in JSX?
03What concrete problem occurs when rendering {count && <span>text</span>} when count is 0?
04Where should the key prop be placed when using map?
05What is the practical difference between returning null and false in JSX?
06When should you use the ternary operator instead of && for conditional rendering?
07Does the key need to be unique across the entire React tree or only among siblings at the same level?
08How do you show a 'No results' message when a filtered list is empty?
09Can a component return an array of elements directly (without a Fragment)?
10What does React do when the same key appears twice at the same level?
Was this helpful?
Sign in to give feedback
