{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/14299","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/14299/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/14299/comments","events_url":"https://api.github.com/repos/facebook/react/issues/14299/events","html_url":"https://github.com/facebook/react/issues/14299","id":383272443,"node_id":"MDU6SXNzdWUzODMyNzI0NDM=","number":14299,"title":"React.lazy remounts component if used within a render","user":{"login":"FredyC","id":1096340,"node_id":"MDQ6VXNlcjEwOTYzNDA=","avatar_url":"https://avatars0.githubusercontent.com/u/1096340?v=4","gravatar_id":"","url":"https://api.github.com/users/FredyC","html_url":"https://github.com/FredyC","followers_url":"https://api.github.com/users/FredyC/followers","following_url":"https://api.github.com/users/FredyC/following{/other_user}","gists_url":"https://api.github.com/users/FredyC/gists{/gist_id}","starred_url":"https://api.github.com/users/FredyC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredyC/subscriptions","organizations_url":"https://api.github.com/users/FredyC/orgs","repos_url":"https://api.github.com/users/FredyC/repos","events_url":"https://api.github.com/users/FredyC/events{/privacy}","received_events_url":"https://api.github.com/users/FredyC/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-21T19:57:14Z","updated_at":"2018-11-21T21:06:39Z","closed_at":"2018-11-21T20:07:46Z","author_association":"NONE","body":"<!--\r\n  Note: if the issue is about documentation or the website, please file it at:\r\n  https://github.com/reactjs/reactjs.org/issues/new\r\n-->\r\n\r\n**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\nSimple reproduction here: https://codesandbox.io/s/6z4qmm2k7n\r\n\r\nThe contrived example does not make much sense, but I got burned by this in the context of react-router. I simply wanted to avoid defining all lazily loaded components up front but instead have them coupled with a particular route.\r\n\r\n```jsx\r\nfunction Routing() {\r\n  <>\r\n    <Route path=\"foo\" component={lazy(() => import('./foo'))} />\r\n  </>\r\n}\r\n```\r\n\r\n**What is the expected behavior?**\r\n\r\nIn case this is intended behavior, it should be definitely documented. Otherwise it would be nice to have some memoized lazy variant. Possibly with hooks coming what about `useLazy` ? :)"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/440808229","html_url":"https://github.com/facebook/react/issues/14299#issuecomment-440808229","issue_url":"https://api.github.com/repos/facebook/react/issues/14299","id":440808229,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDgwODIyOQ==","user":{"login":"FredyC","id":1096340,"node_id":"MDQ6VXNlcjEwOTYzNDA=","avatar_url":"https://avatars0.githubusercontent.com/u/1096340?v=4","gravatar_id":"","url":"https://api.github.com/users/FredyC","html_url":"https://github.com/FredyC","followers_url":"https://api.github.com/users/FredyC/followers","following_url":"https://api.github.com/users/FredyC/following{/other_user}","gists_url":"https://api.github.com/users/FredyC/gists{/gist_id}","starred_url":"https://api.github.com/users/FredyC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredyC/subscriptions","organizations_url":"https://api.github.com/users/FredyC/orgs","repos_url":"https://api.github.com/users/FredyC/repos","events_url":"https://api.github.com/users/FredyC/events{/privacy}","received_events_url":"https://api.github.com/users/FredyC/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T21:06:39Z","updated_at":"2018-11-21T21:06:39Z","author_association":"NONE","body":"I did [another example build on Alpha](https://codesandbox.io/s/k27xkk1qzv) and with `useMemo` just to clarify why it's not working.\r\n\r\nI am not trying to convince you that this is a feature that must be. It's just a suggestion what might be interesting to tackle in a future.  I am sure there might be several reasons I just don't see, especially the complexity of Suspense still kinda eludes me.\r\n\r\nI will send the docs PR soon-ish."}}
{"actor":{"display_login":"FredyC"}}