Definitely not the modal one. Is the benefit of going the modal route worth changing my UI?
When you click on John, the DetailView component will be re-rendered (because it already exists on the screen), which means that John's email will not be put into our state
It would appear like DetailView is re-rendered because it already exists on the screen. That might through off total noobs. I would have preferred something like:
When you click on John, the DetailView component will be re-rendered without updating John's email in state. This is because after mount, it is expected you update email using dispatcher/setter setEmail.
Definitely not the modal one. Is the benefit of going the modal route worth changing my UI?
It would appear like
DetailView
is re-rendered because it already exists on the screen. That might through off total noobs. I would have preferred something like:Thanks for the article. It is quite informative.
No, this was more of an example of how we already solve the issue with conditional rendering, which we also incidentally do a lot with modals :)