Why shallow copying nested state objects in React can cause bugs?
May 14, 2022 · 4 min read · Do you spot a bug in the React snippet below? https://codepen.io/filtered/pen/ZErBveR Selecting an item in any one of the two lists causes the same item to get selected in the other list as well. samList and janeList are supposed to be isolated but t...
Join discussion