React Router API Reference
    Preparing search index...

    Interface SubmitOptions

    Submit options available to navigations

    interface SubmitOptions {
        action?: string;
        encType?: FormEncType;
        fetcherKey?: string;
        flushSync?: boolean;
        method?: HTMLFormMethod;
        navigate?: boolean;
        preventScrollReset?: boolean;
        relative?: RelativeRoutingType;
        replace?: boolean;
        state?: any;
        unstable_defaultShouldRevalidate?: boolean;
        viewTransition?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    action?: string

    The action URL path used to submit the form. Overrides <form action>. Defaults to the path of the current route.

    encType?: FormEncType

    The encoding used to submit the form. Overrides <form encType>. Defaults to "application/x-www-form-urlencoded".

    fetcherKey?: string

    Indicate a specific fetcherKey to use when using navigate=false

    flushSync?: boolean

    Enable flushSync for this submission's state updates

    The HTTP method used to submit the form. Overrides <form method>. Defaults to "GET".

    navigate?: boolean

    navigate=false will use a fetcher instead of a navigation

    preventScrollReset?: boolean

    In browser-based environments, prevent resetting scroll after this navigation when using the component

    Determines whether the form action is relative to the route hierarchy or the pathname. Use this if you want to opt out of navigating the route hierarchy and want to instead route based on /-delimited URL segments

    replace?: boolean

    Set true to replace the current entry in the browser's history stack instead of creating a new one (i.e. stay on "the same page"). Defaults to false.

    state?: any

    State object to add to the history stack entry for this navigation

    unstable_defaultShouldRevalidate?: boolean

    Specify the default revalidation behavior after this submission

    If no shouldRevalidate functions are present on the active routes, then this value will be used directly. Otherwise it will be passed into shouldRevalidate so the route can make the final determination on revalidation. This can be useful when updating search params and you don't want to trigger a revalidation.

    By default (when not specified), loaders will revalidate according to the routers standard revalidation behavior.

    viewTransition?: boolean

    Enable view transitions on this submission navigation