-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Context and Server Side Rendering #38
Comments
The error seems to be on this line: Line 168 in a548d72
That Line 63 in a548d72
Have you wrapped your app with Maybe the solution is to add Line 17 in a548d72
|
I think that's OK. Do we really need |
As I see it, it's either we have it like that as a partial, or we'd also need to define setContextState, and mountContainer in that createContext Call.
|
I guess we can define |
One of our project's GatsbyJS server side rendering seems to have some issues with finding the shape of state during build.
Example Snippet
Gatsby Build error
The link in the error describes common pitfalls of SSR in gatsby.
e.g.
window
object is missing, either mockup window or wrap the code in a conditional so that it only runs if the object is truthy.Running the app in dev mode does not have this issue. (Not SSR)
I'm trying to figure out how to get around this. I'd like to not have to mock out the state of the app and just use context as is, but i'm not sure if that is possible at this point.
The text was updated successfully, but these errors were encountered: