Skip to content

Commit b624c30

Browse files
committed
Add what to watch out for in the example
1 parent 62f311a commit b624c30

File tree

1 file changed

+2
-0
lines changed
  • src/content/reference/react-dom/components

1 file changed

+2
-0
lines changed

src/content/reference/react-dom/components/form.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export default function Search() {
7373

7474
You can override the default reset behaviour of the form by additionally passing an `onSubmit` prop to the `<form>` component calls `preventDefault` on the event and calling the action yourself. Passing `onSubmit` alongside `action` ensures the form can be progressively enhanced if this component is rendered to HTML on the server.
7575

76+
Notice how in the below example now the form is not reset and your input is preserved after the form is submitted.
77+
7678
<Sandpack>
7779

7880
```js

0 commit comments

Comments
 (0)