redirect AND render new url #561
Comments
This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux. Thanks! |
Thanks for answering @timdorr! |
After countless hours investigating the bug I found the withRouter wrapper/decorator.
|
@damianobarbati how did you solve the issue in the end? or what did you end up doing? |
@steodor I solved so many issues about this react-router + react-router-redux I can't even remember how I did fix this one!
|
Thanks! i fiddled with |
Thanks @damianobarbati !
Not working for me, any other thoughts there? we are really hang here! Thanks to all, |
@damianobarbati Did you get solution for this . Please help it's urgent |
@vaibhav-systango if your component is not re-rendering then its props (and state) are not changing either.
Now location is passed as a prop to More about this: https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/withRouter.md |
@damianobarbati But when I run dispatch(push('url')), even the url doesn't change? |
@vaibhav-systango then you didn't apply the router reducer into your redux store maybe? |
@damianobarbati Yes I wasn't injecting router in redux, currently it works with react router dom router.history.push thing. Thanks for your suggestion man. Merry Christmas ;) |
I'm simply trying to redirect browser to new url in my dispatch: typical scenario is dispatching an action which sign in with an ajax request and then redirect the user to /home.
It's so stressing to find proper documentation and working together with react-router and react-router-redux.
Using:
Store created as:
Router created as:
Attempt to redirect after sign in:
The text was updated successfully, but these errors were encountered: