-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Description
Hi there,
I'm getting the following error when attempting to render on the server:
Warning: Failed Context Types: Required context routerwas not specified inMobileApp.
As far as I can tell there's nothing terribly special about my rendering approach and the render works just fine on the client-side. Here's what the server-side code looks like:
Router.run(mobileRoutes, request.url.path, function (Handler) {
const html = React.renderToString(<Handler initialStories={initialStories} />);
//... we never make it down here it seems
});Note, the server-side file is transpiled with Babel, hence the ability to use JSX like this, but am I missing something else? MobileApp in this case does also have contextTypes defined.
The eventual error that's thrown is this which I imagine is related to the router context stuff:
[TypeError: Cannot read property 'getRouteAtDepth' of undefined]
Metadata
Metadata
Assignees
Labels
No labels