The form has a submit handler that should display a greeting. Instead, hitting Submit causes the page to reload (you’ll see the iframe flicker), state resets, and the greeting never appears.
Symptoms
- Click Submit — page reloads
- The
#result greeting never sticks
- Inputs lose their value
Your Task
Make Submit display the greeting without reloading the page.
Think about it: HTML forms have a default browser behavior — they submit to the server and navigate away. React doesn’t override that for you. Which method on the event object cancels the default action?