Hey there, I really appreciate your tutorial, great stuff.
That said, the way you handle reconciliation leads to bugs if things are conditionally rendered. I've forked your codesandbox to show the issue: https://codesandbox.io/s/didact-8-0l4lz. You should see that clicking the show / hide button will duplicate the count element. Note that if you first increment the count it works correctly, it's not obvious to me why that is.
Hey there, I really appreciate your tutorial, great stuff.
That said, the way you handle reconciliation leads to bugs if things are conditionally rendered. I've forked your codesandbox to show the issue: https://codesandbox.io/s/didact-8-0l4lz. You should see that clicking the show / hide button will duplicate the count element. Note that if you first increment the count it works correctly, it's not obvious to me why that is.
Cheers!