Form

The Form component is used to navigate around with user input. It has all the same properties as the native form element, and a few additional ones.

import { Form } from 'react-sprout';

Additional properties

  • Name
    relative
    Type
    boolean
    Type
    true
    Description

    A boolean indicating whether the action url is relative to the route.

  • Name
    push
    Type
    boolean
    Description

    A boolean indicating whether a new entry in the history stack should be pushed.

  • Name
    replace
    Type
    boolean
    Description

    A boolean indicating whether the current entry in the history stack should be replaced.

  • Name
    title
    Type
    string
    Description

    The title for the new page.

  • Name
    state
    Type
    any
    Description

    The history state after navigation.

  • Name
    sticky
    Type
    boolean
    Type
    false
    Description

    A boolean indicating whether the navigation is sticky.

  • Name
    reload
    Type
    boolean
    Type
    false
    Description

    A boolean indicating whether to reload all data for the navigation.

  • Name
    cache
    Type
    boolean
    Type
    false
    Description

    A boolean indicating whether the current page should be kept in the back/forward cache.

  • Name
    onNavigate
    Type
    function
    Description

    A callback that is invoked when a navigation is initiated.

  • Name
    onCanceled
    Type
    function
    Description

    A callback that is invoked when a navigation is canceled.

  • Name
    onNavigateStart
    Type
    function
    Description

    A callback that is invoked when a navigation is not canceled.

  • Name
    onActionError
    Type
    function
    Description

    A callback that is invoked when a navigation action throws an error.

  • Name
    onAborted
    Type
    function
    Description

    A callback that is invoked when a navigation is aborted.

  • Name
    onNavigateEnd
    Type
    function
    Description

    A callback that is invoked when a navigation is finished.