Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Description
interfaceDog{id?:string;name:string;}constdogs:Dog[]=[{id:"spikey",name:"spike"},{name:"spot"},]asconst;exportconstDogs=()=>(<div>{dogs.map((dog)=>(<divkey={dog.id}>{dog.name}</div>))}</div>);
The above code does not currently violatejsx-key. Withtype information it could, and I believe it really should. Something that can potentially be undefined is unsuitable as a key.
Metadata
Metadata
Assignees
Labels
No labels