Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to let the routes rerender (after flux update) #350

Closed
tcoopman opened this issue Oct 5, 2014 · 1 comment
Closed

How to let the routes rerender (after flux update) #350

tcoopman opened this issue Oct 5, 2014 · 1 comment

Comments

@tcoopman
Copy link

tcoopman commented Oct 5, 2014

I have a flux architecture but without the singleton stores. So I have instances of stores.

Now I want to rerender my routes, and with the singleton stores I could just place this in app.js and call React.renderComponent again, but because I have store instances, I don't know how to pass the instance to the routes.

I want to do a getStateFromStore() with the storeInstance like this:

var state = getStateFromStore() {
  return {
    appState: storeInstance.getState()
  }
}

var routes = (
  <Routes location="history" onTransitionError={onError}>
    <Route handler={App} appState={appState}/>
  </Routes>
);

How can I do this? If I were able to rerender the routes without the React.renderComponent then I could add a update method in the routes file too.

If you have other suggestions on how to solve this, they are welcome too :)

@ryanflorence
Copy link
Member

Please follow #261, I think it will be what you're looking for.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants