Open
Description
Summary
If you want to reset the React state of a playground, but not the code, it's very unclear how to do so.
The only way I found is clicking on "Reset", which triggers a popup saying "Reset all your edits too?" and then pressing "Cancel". This will successfully reset the state but not the code. However there are two issues with that:
- It's not clear at all that this is the proper way to do so. Should there be two buttons instead?
- UX itself is counter-intuitive:
a. The question is "Reset all your edits too?", which is a yes/no question, but the options are "Ok" or "Cancel"
b. Normally if you press "Cancel" on a confirmation modal, it should cancel the original action altogether, but here is applies the action partially (reset the state but not the edits)
Page
https://react.dev/learn/separating-events-from-effects#challenges
Details
No response