-
Notifications
You must be signed in to change notification settings - Fork 26
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
Usage with react-hot-loader
?
#55
Comments
Maybe you can use the following as a starting point: https://github.com/denvned/isomorphic-relay-boilerplate/blob/5dd32f3c5759b9305dc1c731bbf80671824978fc/frontend/src/app.js |
Thanks @denvned. My code is actually very similar, with two changes:
|
Yeah, the boilerplate have not been updated to use the current versions of isomorphic-relay-router.
I'm not keeping components' local state in the boilerplate for reasons similar to explained in reduxjs/redux#1455 (comment). Maybe that's why I have not seen any Relay errors there. Maybe this will not fix these specific errors, but you probably need to rematch routes inside Generally, I suggest to try to make this works without react-hot-loader first, and then try to make it work with it. |
@leebenson did you ever get to the bottom of this? I'm experiencing the same behavior with Apologies in advance since this does not relate to |
@rogersp, I actually didn't. I wound up swapping out Relay for Apollo on that particular project, so Relay routing went along with it. Sounds like an issue that might need addressing at react-hot-loader? |
@leebenson For what it's worth I was able to get around this by making sure my Relay containers were exported in different modules than the React components they wrapped. This is how it's done in the Relay Fullstack project. Also, thanks for turning me on to Apollo. Looks slick! |
np - glad you got it working @rogersp. |
I'm not sure whether this relates more to react-hot-loader, but I'm trying to get my Relay components to work alongside react-hot-loader 3.0.
My client-side set-up looks something like this...
Making a change to a React component gets pushed down to the browser fine, and local component state is retained.
However, when making a change, navigating to another route and then navigating back again, I get this in the console...
Any known workarounds?
Thanks in advance.
The text was updated successfully, but these errors were encountered: