News for hackers. Stuff that matters.
Re:Solid.js feels like what I always wanted React to be by AgentME on Tuesday March 01, 2022 @01:40AM (#30510478)
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.
Re:Solid.js feels like what I always wanted React to be by t_tsonev on Tuesday March 01, 2022 @02:23AM (#30510760)
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.
Re:Solid.js feels like what I always wanted React to be by sbergot on Tuesday March 01, 2022 @05:26AM (#30512308)
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.