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.

Bug: On server side history change is not propagated to store #284

Closed
@svrcekmichal

Description

@svrcekmichal

On server side, accessing any route does not change redux state.

Setup on server side:

const memoryHistory = createMemoryHistory();
const store = createStore(memoryHistory);
const history = syncHistoryWithStore(memoryHistory,store);
const routes = getRoutes(store);

After react-router match store.geState() returned this:

{ routing: 
   { locationBeforeTransitions: 
      { pathname: '/',
        search: '',
        hash: '',
        state: null,
        action: 'POP',
        key: '8j5ti7' } } }

On client side, after syncing history with store, redirect to / is triggered.

Issue can be simulated on this repo svrcekmichal\universal-react
Server side setup is here

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