{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/12329","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/12329/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/12329/comments","events_url":"https://api.github.com/repos/facebook/react/issues/12329/events","html_url":"https://github.com/facebook/react/issues/12329","id":302290339,"number":12329,"title":"React.createElement: type is invalid","user":{"login":"dkfiresky","id":2175645,"avatar_url":"https://avatars1.githubusercontent.com/u/2175645?v=4","gravatar_id":"","url":"https://api.github.com/users/dkfiresky","html_url":"https://github.com/dkfiresky","followers_url":"https://api.github.com/users/dkfiresky/followers","following_url":"https://api.github.com/users/dkfiresky/following{/other_user}","gists_url":"https://api.github.com/users/dkfiresky/gists{/gist_id}","starred_url":"https://api.github.com/users/dkfiresky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkfiresky/subscriptions","organizations_url":"https://api.github.com/users/dkfiresky/orgs","repos_url":"https://api.github.com/users/dkfiresky/repos","events_url":"https://api.github.com/users/dkfiresky/events{/privacy}","received_events_url":"https://api.github.com/users/dkfiresky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-05T12:58:31Z","updated_at":"2018-03-05T15:21:04Z","closed_at":"2018-03-05T15:21:04Z","author_association":"NONE","body":"**Do you want to request a *feature* or report a *bug*?**\r\n\r\nbug\r\n\r\n**What is the current behavior?**\r\n\r\n```\r\nimport React from 'react';\r\nimport { renderToString } from 'react-dom/server';\r\nimport { StaticRouter, Route, IndexRoute, Link } from 'react-router';\r\n\r\nclass Dashboard extends React.Component {\r\n  render() {\r\n    return (\r\n      <div>\r\n        <h1>Dashboard</h1>\r\n      </div>\r\n    );\r\n  }\r\n}\r\n\r\nclass App extends React.Component {\r\n  render() {\r\n    return (\r\n      <div>\r\n        <Link to=\"/\">Dashboard</Link>\r\n\r\n        <Route path=\"/\">\r\n          <IndexRoute component={Dashboard} />\r\n        </Route>\r\n      </div>\r\n    );\r\n  }\r\n}\r\n\r\nconst html = renderToString(\r\n  <StaticRouter location={request.url} context={context}>\r\n    <App />\r\n  </StaticRouter>\r\n);\r\n```\r\n\r\n```\r\nWarning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\r\n    in App\r\n    in Router\r\n    in StaticRouter\r\n\r\nTypeError: Cannot read property 'toLowerCase' of undefined\r\n    at ReactDOMServerRenderer.renderDOM (/node_modules/react-dom/cjs/react-dom-server.node.development.js:2304:28)\r\n    at ReactDOMServerRenderer.render (/node_modules/react-dom/cjs/react-dom-server.node.development.js:2298:21)\r\n    at ReactDOMServerRenderer.read (/node_modules/react-dom/cjs/react-dom-server.node.development.js:2234:19)\r\n    at renderToString (/node_modules/react-dom/cjs/react-dom-server.node.development.js:2501:25)\r\n    at <anonymous>\r\n```\r\n\r\n**What is the expected behavior?**\r\n\r\nRendered Dashboard component.\r\n\r\n**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**\r\n\r\nreact: **16.2.0**\r\nreact-dom: **16.2.0**\r\nreact-router: **4.2.0**"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/370453074","html_url":"https://github.com/facebook/react/issues/12329#issuecomment-370453074","issue_url":"https://api.github.com/repos/facebook/react/issues/12329","id":370453074,"user":{"login":"dkfiresky","id":2175645,"avatar_url":"https://avatars1.githubusercontent.com/u/2175645?v=4","gravatar_id":"","url":"https://api.github.com/users/dkfiresky","html_url":"https://github.com/dkfiresky","followers_url":"https://api.github.com/users/dkfiresky/followers","following_url":"https://api.github.com/users/dkfiresky/following{/other_user}","gists_url":"https://api.github.com/users/dkfiresky/gists{/gist_id}","starred_url":"https://api.github.com/users/dkfiresky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkfiresky/subscriptions","organizations_url":"https://api.github.com/users/dkfiresky/orgs","repos_url":"https://api.github.com/users/dkfiresky/repos","events_url":"https://api.github.com/users/dkfiresky/events{/privacy}","received_events_url":"https://api.github.com/users/dkfiresky/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T15:21:04Z","updated_at":"2018-03-05T15:21:04Z","author_association":"NONE","body":"@TrySound thanks for help, it seems I've used old `react-router` tutorial, and the `Link` is not exported as well."}}
{"actor":{"display_login":"dkfiresky"}}