react.dev
react.dev copied to clipboard
[Mistake]: Unused key in useOptimistic code sample
Summary
The code example for useOptimistic
hook contains unused key
parameter
Page
https://19.react.dev/reference/react/useOptimistic#usage
Details
In the Optimistically updating forms
section, inside the code sample there is an unused key
parameter, which, apparently, should have been used on the line 25:
<div key={index}>