-
Notifications
You must be signed in to change notification settings - Fork 20
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
Implementation of React Router v4 #2
Conversation
@kirill-konshin thank you. I am trying to dig into your work; in a client env, I use (like recommended)
(all this being wrapped for dev purposes by react-hot-loader AppContainer ;) In your example, you seem to reshuffle the order to
Which would, in the client environment, disconnect the Router from the provider. Are you taking care of the wiring in WrapperProvider (in effect, replacing ConnectedRouter), allowing me to just remove ConnectedRouter in the server env ? |
|
Yes and no ;) ConnectedRouter knows about Provider (the only reason it exists really ;) In server-side mode, ConnectedRouter is gone (I assume it's done by your Wrapper) so, in a redux context, I was wondering if you have any issue with a « swap » between WrapperPrivider and ConnectedRouter? |
Oh, you were talking about
|
But in your example, You lost me here 🤗 |
You are looking at routes config, router itself is defined in different file: https://github.com/kirill-konshin/create-react-server/blob/master/examples/create-react-app/src/index.js. |
that's 0.2, I'm on your 0.3 branch for React Router 4. |
The reason for this was some weird behavior of HMR in React Router... Technically |
Thank you. You mean I can have the same combo in CS & SS ?
that would be awesome! |
There should be no problem. Keep in mind that CRS does not support async routes yet, at least w/o static route configuration... that's the only reason why it's not released yet :( Please keep me posted about your experience with 0.3.0 branch! |
of course. So cool ;) |
@kirill-konshin I'm facing an issue you might have already encountered. babel-preset-react-app is now 3.x. When up to date in the react-app, All you need is a minimal app.js (empty function) and
|
How is this related to this package? Maybe you should talk to authors of preset. |
Because as soon as babel-preset-react-app is updated to the latest version (and that's mandatory for recent create-react-app packages), even your create-react-app example suffers the same problem ;) |
Have you reported that to authors? |
I would if the bug was theirs but the exception is raised only by server.js I'll keep looking but I was wondering if you encountered the problem which would explain why you stick to old create-react-app versions. |
I will look into it |
I reproduced the error, will fix it as soon as I can. Looks like Babel no longer compiles files in certain paths, so I either have to reconfigure it or do something else. |
thank you! |
Closing this PR because discussion has diverted far away from original purpose of this PR. Next time pls create separate issues for each question :) Please see issue #3, I have a fix now, but I need to test it more and I will push it today/tomorrow. |
No description provided.