diff --git a/.changeset/gorgeous-geese-sit.md b/.changeset/gorgeous-geese-sit.md new file mode 100644 index 0000000000..c38daf1ce8 --- /dev/null +++ b/.changeset/gorgeous-geese-sit.md @@ -0,0 +1,5 @@ +--- +"react-router-dom": patch +--- + +Fix `fetcher.submit` types - remove incorrect `navigate`/`fetcherKey`/`unstable_viewTransition` options because they are only relevant for `useSubmit` diff --git a/packages/react-router-dom/dom.ts b/packages/react-router-dom/dom.ts index 960e0b5036..ca2ac9a767 100644 --- a/packages/react-router-dom/dom.ts +++ b/packages/react-router-dom/dom.ts @@ -150,7 +150,10 @@ function isFormDataSubmitterSupported() { return _formDataSupportsSubmitter; } -export interface SubmitOptions { +/** + * Submit options shared by both navigations and fetchers + */ +interface SharedSubmitOptions { /** * The HTTP method used to submit the form. Overrides `