Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both Svelte[0] and React[1] are the same in this regard, the key is there as an optimization and isn't required in either framework. The only difference is that React's key is on the element whereas Svelte is as part of the each expression.

[0] https://svelte.dev/tutorial/keyed-each-blocks

[1] https://reactjs.org/docs/lists-and-keys.html



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: