if (c) return <div><Foo /><Bar /><Baz /></div>; else return <div><Baz /><Bar /><Foo /></div>; What will React do to the state of Foo/Bar/Baz in this case? Is it a reorder or delete/insert? Do I need keys? A linter should probably warn about adding keys.
-
Show this thread
-
Replying to @sebmarkbage
My recollection is that I've fixed performance problems related to this before. If a linter warned it would have been easier for a beginner to avoid the issue probably. However you're right that it's very rarely an issue...
1 reply 0 retweets 1 like
Replying to @sebinsua @sebmarkbage
Sometimes it feels like linters should have a verbose mode that complains more but avoid bothering you by default.
9:53 AM - 26 Oct 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.