Open kafaichoi opened 9 years ago
Me too. I've tried to fix or ignore 'makeRouteHooksSafe'. But I couldn't make it. I hope to catch up this issue. It's very serious problem for me. Plz anyone follow up.
I finally found out I had this too, used some of the code from this repo, but not SSR; initial page loads don't go over onEnter, which is a real no go to me! Not sure if it's a problem with this repo or with react-router/redux-router yet. Let's keep each other informed.
update:
Switching to redux-simple-router
directly fixes this problem. (any no hacky MakeRouteHooksSafe)
https://github.com/jlongster/react-redux-universal-hot-example/commit/e13b93518c8c9b5524ad50f1c566ed6c480c1888?diff=split
Don't know yet if it will break anything else to use this other library; but this discussion seems like the demise of redux-router
anyway:
https://github.com/rackt/redux-router/issues/172
@laurenskling Wow. Your comment is very helpful to me. Recently I was eliminating MakeRouteHooksSafe middleware temporarily. And I change function that called by onEnter provision against when store or dispatch is not working. But this is not a good solution. So I'm glad to hear that your proposal. Thanks.
When I go to chat page by typing in browser location, the requireLogin hook is not called.
I guess it is because there is not store yet when the safeOnEnter hook get called for the first time rendering.