Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Using basename for history causes infinite loop #64

@kromit

Description

@kromit

I want to run my app in a context so i need a history basename:

import {createHistory,useBasename} from 'history';
const history = useBasename(createHistory)({
    basename: '/mybase'
});

I also use an onEnter in the route which loads current session and calls dispatch. The dispatch runs into the syncReduxAndRouter and call pushState causing the loop. This happens because redux-simple-router uses window.location to check the changes and is not is not aware of the basename used in the history so it always calls pushState

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