Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-form-onsubmit-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": patch
---

Remove explicit `onSubmit` type override from `SharedFormProps` to fix deprecation warning with `@types/react@19.x`
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@
- refusado
- remorses
- renyu-io
- restareaByWeezy
- reyronald
- RFCreate
- richardkall
Expand Down
7 changes: 0 additions & 7 deletions packages/react-router/lib/dom/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1770,13 +1770,6 @@ interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
*/
preventScrollReset?: boolean;

/**
* A function to call when the form is submitted. If you call
* [`event.preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
* then this form will not do anything.
*/
onSubmit?: React.FormEventHandler<HTMLFormElement>;

/**
* Specify the default revalidation behavior after this submission
*
Expand Down
Loading