{"action":"created","issue":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/2277","repository_url":"https://api.github.com/repos/react-navigation/react-navigation","labels_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/2277/labels{/name}","comments_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/2277/comments","events_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/2277/events","html_url":"https://github.com/react-navigation/react-navigation/issues/2277","id":246793827,"node_id":"MDU6SXNzdWUyNDY3OTM4Mjc=","number":2277,"title":"DrawerNavigator screen shouldn't unmount","user":{"login":"vanBrunneren","id":11269836,"node_id":"MDQ6VXNlcjExMjY5ODM2","avatar_url":"https://avatars2.githubusercontent.com/u/11269836?v=4","gravatar_id":"","url":"https://api.github.com/users/vanBrunneren","html_url":"https://github.com/vanBrunneren","followers_url":"https://api.github.com/users/vanBrunneren/followers","following_url":"https://api.github.com/users/vanBrunneren/following{/other_user}","gists_url":"https://api.github.com/users/vanBrunneren/gists{/gist_id}","starred_url":"https://api.github.com/users/vanBrunneren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanBrunneren/subscriptions","organizations_url":"https://api.github.com/users/vanBrunneren/orgs","repos_url":"https://api.github.com/users/vanBrunneren/repos","events_url":"https://api.github.com/users/vanBrunneren/events{/privacy}","received_events_url":"https://api.github.com/users/vanBrunneren/received_events","type":"User","site_admin":false},"labels":[{"id":526653628,"node_id":"MDU6TGFiZWw1MjY2NTM2Mjg=","url":"https://api.github.com/repos/react-navigation/react-navigation/labels/bug","name":"bug","color":"e74c3c","default":true},{"id":619086203,"node_id":"MDU6TGFiZWw2MTkwODYyMDM=","url":"https://api.github.com/repos/react-navigation/react-navigation/labels/component:%20Drawer","name":"component: Drawer","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"brentvatne","id":90494,"node_id":"MDQ6VXNlcjkwNDk0","avatar_url":"https://avatars2.githubusercontent.com/u/90494?v=4","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"assignees":[{"login":"brentvatne","id":90494,"node_id":"MDQ6VXNlcjkwNDk0","avatar_url":"https://avatars2.githubusercontent.com/u/90494?v=4","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false}],"milestone":null,"comments":24,"created_at":"2017-07-31T15:20:22Z","updated_at":"2018-06-20T19:35:27Z","closed_at":null,"author_association":"NONE","body":"Hi at all, maybe it's a misunderstanding or just my fault but I googled for hours, I made a StackOverflow post and I wrote on Discord but no one seems to have a solution to my problem. \r\n\r\n### Current Behavior\r\nI built a very simple example which shows my problem. I have a DrawerNavigator with 2 Screens\r\n\r\n```\r\nclass HomeView extends Component {\r\n\r\n\tcomponentDidMount() {\r\n\t\tconsole.log(\"mount home\");\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\treturn(\r\n\t\t\t<View>\r\n\t\t\t\t<Text>HomeView</Text>\r\n\t\t\t</View>\r\n\t\t);\r\n\r\n\t}\r\n\r\n}\r\n\r\nclass SecondView extends Component {\r\n\r\n\tcomponentDidMount() {\r\n\t\tconsole.log(\"mount second\");\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\treturn(\r\n\t\t\t<View>\r\n   \t\t                 <Text onPress={ () => this.props.navigation.navigate('HomeView') }>SecondView</Text>\r\n\t\t\t</View>\r\n\t\t);\r\n\r\n\t}\r\n\r\n}\r\n\r\nconst MyNavigator = DrawerNavigator({\r\n\r\n\tHomeView: {\r\n\t\tscreen: HomeView\r\n\t},\r\n\r\n\tSecondView: {\r\n\t\tscreen: SecondView\r\n\t}\r\n\r\n});\r\n```\r\n\r\nMy steps:\r\n1. The HomeView gets mounted\r\n2. I open the drawer\r\n3. I press on Second View\r\n4. Second View gets mounted\r\n5. I press on \"Second View\"\r\n6. It navigates to **HomeView and the componentDidMount function gets called**\r\n\r\n<p align=\"center\">\r\n<img align=\"center\" src=\"https://media.giphy.com/media/26n6Tj2dcCgcjjlDy/giphy.gif\" width=\"600\" alt=\"Giphy Problem\"/>\r\n</p>\r\n\r\n### Expected Behavior\r\nI'm expecting the HomeView should stay mounted. If I'm calling `this.props.navigation.navigate('HomeView')` I'm expecting my app should show the HomeView Screen as I had it before leaving it. Am I the only one who's facing this issue? Or is my concept completely wrong and someone can tell me a better way to do this? This is a very basic example but think of I'm having a Drawer and each object is a StackNavigator with multiple subroutes. Consider to go navigate 3 times in the first stack, then call another Route from the Drawer and then going back to the first route. You don't want to rerender the whole Stack.... \r\n\r\nI'm lucky with any suggestions because I'm getting tired of try and fail \r\n\r\n### Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| react-navigation |  1.0.0-beta.11\r\n| react-native     |  0.46.4\r\n| node             | 8.0.0\r\n| npm or yarn      | yarn 0.24.6\r\n"},"comment":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/comments/398870367","html_url":"https://github.com/react-navigation/react-navigation/issues/2277#issuecomment-398870367","issue_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/2277","id":398870367,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODg3MDM2Nw==","user":{"login":"brentvatne","id":90494,"node_id":"MDQ6VXNlcjkwNDk0","avatar_url":"https://avatars2.githubusercontent.com/u/90494?v=4","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T19:35:27Z","updated_at":"2018-06-20T19:35:27Z","author_association":"MEMBER","body":"moved this issue to new repo https://github.com/react-navigation/react-navigation-drawer/issues/4"}}
{"actor":{"display_login":"brentvatne"}}