Skip to content

Commit c299ceb

Browse files
authored
Add deprecation info for FormEvent and FormEventHandler (#799)
1 parent 911f928 commit c299ceb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

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

13801380
</details>
13811381

1382+
> 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.
1383+
13821384
**Typing onSubmit, with Uncontrolled components in a Form**
13831385

13841386
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:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ 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+
6264
**Typing onSubmit, with Uncontrolled components in a Form**
6365

6466
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)