Usually it just works. But, even following the "Rules of Hooks" (https://reactjs.org/docs/hooks-rules.html), I managed to write some code where the state that belonged to one component ended up in its adjacent sibling. When that happened, I really wasn't sure what to do other than go on a deep react dive. It's not clear how to debug stuff like that.
I came to realize that I had confused the reconciler. The fix is basically to just use the key= attribute everywhere, not just in arrays.
I came to realize that I had confused the reconciler. The fix is basically to just use the key= attribute everywhere, not just in arrays.