You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that after refactorings we sometimes forgot to remove the key on the root fragment of a new component, this seems to be entirely redundant and just add overhead.
example:
constComponent: FC=()=>{// v key is redundant herereturn<pkey={1}>test</test>;}
What this means is that I'm not sure there's any way to statically identify a key prop that should be removed, since potentially all of them could be meaningful.
I noticed that after refactorings we sometimes forgot to remove the
key
on the root fragment of a new component, this seems to be entirely redundant and just add overhead.example:
This would be effectively the counter-rule to `https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key
I think a good heuristic would be to match any fragment that is not contained within a callback
eg. Array.map
.The text was updated successfully, but these errors were encountered: