Y
Hacker News
new
|
ask
|
show
|
jobs
by
AgentME
1572 days 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.
1 comments
t_tsonev
1572 days ago
If 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.
link
sbergot
1572 days ago
keys 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.
link