Skip to content

Commit 5ef957b

Browse files
authored
Add deprecation notice for FormEvent and FormEventHandler
Update documentation to reflect deprecation of FormEvent and FormEventHandler in React v19.2.10, suggesting use of SubmitEvent and SubmitEventHandler.
1 parent 911f928 commit 5ef957b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

docs/basic/getting-started/forms-and-events.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ The first method uses an inferred method signature `(e: React.FormEvent<HTMLInpu
5959

6060
</details>
6161

62+
> Starting with React v19.2.10 `FormEvent` and `FormEventHandler` are deprecated and should be replaced with `SubmitEvent` and `SubmitEventHandler`. The older event types will still work but trigger a deprecation message.
63+
64+
6265
**Typing onSubmit, with Uncontrolled components in a Form**
6366

6467
If you don't quite care about the type of the event, you can just use `React.SyntheticEvent`. If your target form has custom named inputs that you'd like to access, you can use a type assertion:

0 commit comments

Comments
 (0)