Skip to content

propsHistory #4347

@sanbenedetto

Description

@sanbenedetto

Describe the bug

keep router props history if page was loaded with passed props.

it was fixed here: 5ad3d8a (committed on Jan 20, 2023)
but it is still a bug when user swipe-back.

in other words: when user "go back" (router.back()), everything is ok (namely: router.propsHistory.pop();).
but when user swipe-back "it" doesn't "pop" propsHistory (which will cause a mess in route-props).
all we need is this line: router.propsHistory.pop(); (or router.propsHistory.length = router.history.length)
exactly right after this line:

router.history.pop();

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