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

[React Beta Docs] Reset Button

Open HamzaAmar opened this issue 3 years ago • 2 comments

Add a reset Button to the UI section in the Challenge some times we need only to reset the UI but not the code because the reset that exist in the challenge reset both the code and the UI you loss all the work you make is this any chance that you can add this feature;

Group 2

  • I like to add an invisible button reset to the right top corner of UI Screen and get Visible only when you hover or focus within it
  • add warning when you click the reset sandbox above the code that say "be caution if you reset you gonna loss you work"

Group 3

and Thank you so much for the website I think this is the best documentation I ever had about react and I hope and I couldn't wait the time when all feature is complete.

HamzaAmar avatar Jun 27 '22 13:06 HamzaAmar

some times we need only to reset the UI

We can't actually reset the UI alone. To reset the UI we have to reset the code as well. If you meant reloading the UI it is already getting reloaded on code change. So I think it is better to have one reset button at the top.

add warning when you click the reset sandbox above the code that say "be caution if you reset you gonna loss you work"

@gaearon what do you think about this?

harish-sethuraman avatar Jun 28 '22 05:06 harish-sethuraman

some times we need only to reset the UI

We can't actually reset the UI alone. To reset the UI we have to reset the code as well. If you meant reloading the UI it is already getting reloaded on code change. So I think it is better to have one reset button at the top.

add warning when you click the reset sandbox above the code that say "be caution if you reset you gonna loss you work"

@gaearon what do you think about this?

Or move the "Reset" button to the left above the code, if reset is specific to code and has nothing to do with UI. The UI updates by itself when code changes but then because the reset button was right above it, I thought I needed to press it to update the UI but had my code got erased instead. Perhaps both reset button above code, and a one-time alert when clicking it to let the user know that it resets code only, and the UI updates automatically when changing code.

DanyPell avatar Jul 06 '22 19:07 DanyPell