Skip to content

Is it possible to bring parameters outside the url when jumping routes? #2737

@jamieYou

Description

@jamieYou

What problem does this feature solve?

When the react router jumps the route, in addition to taking the parameter to the url, it can also be placed in the state.

Reference https://reacttraining.com/react-router/web/api/location

The characteristic of this parameter is that even if the page is refreshed, it still works, even if it is not on the url.
But when the url is shared, this parameter will not be taken.
Such parameters are only useful in the current session.

What does the proposed API look like?

like this

push({
   path: '',
   query: {},
   params: {},
   state: {},
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions