{"action":"closed","issue":{"url":"https://api.github.com/repos/denvned/isomorphic-relay-router/issues/24","repository_url":"https://api.github.com/repos/denvned/isomorphic-relay-router","labels_url":"https://api.github.com/repos/denvned/isomorphic-relay-router/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/denvned/isomorphic-relay-router/issues/24/comments","events_url":"https://api.github.com/repos/denvned/isomorphic-relay-router/issues/24/events","html_url":"https://github.com/denvned/isomorphic-relay-router/issues/24","id":151072551,"number":24,"title":"RouterContext is not a valid React Element","user":{"login":"mattecapu","id":5738009,"avatar_url":"https://avatars.githubusercontent.com/u/5738009?v=3","gravatar_id":"","url":"https://api.github.com/users/mattecapu","html_url":"https://github.com/mattecapu","followers_url":"https://api.github.com/users/mattecapu/followers","following_url":"https://api.github.com/users/mattecapu/following{/other_user}","gists_url":"https://api.github.com/users/mattecapu/gists{/gist_id}","starred_url":"https://api.github.com/users/mattecapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattecapu/subscriptions","organizations_url":"https://api.github.com/users/mattecapu/orgs","repos_url":"https://api.github.com/users/mattecapu/repos","events_url":"https://api.github.com/users/mattecapu/events{/privacy}","received_events_url":"https://api.github.com/users/mattecapu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-26T08:22:30Z","updated_at":"2016-04-26T09:20:07Z","closed_at":"2016-04-26T09:20:06Z","body":"This is the code I use to pre-render on the server\r\n\r\n```js\r\nconst networkLayer = new Relay.DefaultNetworkLayer(\r\n    `http://${HTTP_ADDRESS}:${HTTP_PORT}/graphql`\r\n);\r\n\r\nreturn async (context) => {\r\n    const { redirectLocation, renderProps } =\r\n        await new Promise((resolve, reject) => {\r\n            match({\r\n                routes: routes,\r\n                location: context.request.url\r\n            }, (err, redirectLocation, renderProps) => {\r\n                if (err) {\r\n                    return reject(err);\r\n                }\r\n                return resolve({ redirectLocation, renderProps });\r\n            });\r\n        });\r\n\r\n    if (redirectLocation) {\r\n        context.redirect(302, redirectLocation.pathname + redirectLocation.search);\r\n    } else if (renderProps) {\r\n        const { data, props } =\r\n            await IsomorphicRouter.prepareData(renderProps, networkLayer);\r\n\r\n        context.response.status = 200;\r\n        context.response.body = DocumentBuilder(\r\n            <IsomorphicRouter.RouterContext {...props} />,\r\n            data\r\n        );\r\n    } else {\r\n        context.throw(404, 'Not found');\r\n    }\r\n};\r\n```\r\n\r\n`DocumentBuilder` just renders a template using `ReactDOMServer.renderToStaticMarkup`, which fires the error:\r\n\r\n> Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.\r\n\r\nI'm using `isomorphic-relay-router@0.7.0-beta.0`, `isomorphic-relay@0.6.0-beta.0`, `react-router@2.3.0` and `react-router-relay@0.12.2`.\r\nI suspect the latter in particular could be the cause of the problem, because it had a recent breaking API change to the renderer component, but I really don't know."}}