3 ms·
JSX doesn't have loops. When using React, you use regular not-React-specific Javascript tools to do loops and create lists of React elements.
by AgentME 5y ago
JSX doesn't have loops. When using React, you use regular not-React-specific Javascript tools to do loops and create lists of React elements.
- t_tsonev 5y agoIf this is true, why do you need unique item keys? React cares about loops a lot more than it may seem at a first look.
- sbergot 5y agokeys are not specific to loops. They are needed whenever you are returning a react document with a dynamic structure. They allow for more fine grain dom updates.