react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

[Bug]: "Reset state" on the playgrounds UX is confusing

Open NicolasRoelandt opened this issue 7 months ago • 0 comments

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:

  1. It's not clear at all that this is the proper way to do so. Should there be two buttons instead?
  2. 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

NicolasRoelandt avatar Jun 15 '25 17:06 NicolasRoelandt