Skip to content

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

Open
@NicolasRoelandt

Description

@NicolasRoelandt

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions