{"action":"created","issue":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4907","repository_url":"https://api.github.com/repos/react-navigation/react-navigation","labels_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4907/labels{/name}","comments_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4907/comments","events_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4907/events","html_url":"https://github.com/react-navigation/react-navigation/issues/4907","id":354095965,"node_id":"MDU6SXNzdWUzNTQwOTU5NjU=","number":4907,"title":"(V1) tab navigation: Can't reset nested stack in tab A when currently in tab B","user":{"login":"assafb81","id":28925534,"node_id":"MDQ6VXNlcjI4OTI1NTM0","avatar_url":"https://avatars3.githubusercontent.com/u/28925534?v=4","gravatar_id":"","url":"https://api.github.com/users/assafb81","html_url":"https://github.com/assafb81","followers_url":"https://api.github.com/users/assafb81/followers","following_url":"https://api.github.com/users/assafb81/following{/other_user}","gists_url":"https://api.github.com/users/assafb81/gists{/gist_id}","starred_url":"https://api.github.com/users/assafb81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assafb81/subscriptions","organizations_url":"https://api.github.com/users/assafb81/orgs","repos_url":"https://api.github.com/users/assafb81/repos","events_url":"https://api.github.com/users/assafb81/events{/privacy}","received_events_url":"https://api.github.com/users/assafb81/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-26T13:43:07Z","updated_at":"2018-08-27T18:39:55Z","closed_at":"2018-08-27T18:39:55Z","author_association":"NONE","body":"## The issue tracker is reserved for bug reports only.\r\n\r\nI have read several issue but all of them are closed without any solution.\r\nCan't use `popToTop` when Stack navigator are nested inside Tab navigator.\r\nI have Tab stack, each tab is stack navigator\r\n\r\nMy tab stack looks like this:\r\nstackName ->`mainStack`\r\n1. `Tab A`\r\n1.1 `Screen1` in stack navigator\r\n1.1.1 `Screen11`\r\n2. `Tab B`\r\n2.1 `Screen2`\r\n3. `Tab C`\r\n3.1 `Screen3`\r\n4. `Tab D`\r\n4.1 `Screen4` in stack navigator\r\n4.1.1 `Screen44`\r\n4.1.1.1 `Screen444`\r\n\r\nThe scenario is:\r\n1. user in Tab A in `Screen1`, which is the root of the stack navigator of `tab A`\r\n2. user navigate to `Screen11`, which is the next screen in stack navigator of `tab B`\r\n3. user navigates to `TabD` - now the user in `Screen4` which is the root of the stack navigator of `tabD`\r\n4. user navigates to `Screen44`, which is the next screen in stack navigator of `tabD`\r\n4. user navigates to `Screen444`, which is the next screen in stack navigator of `tabD`\r\n5. in `screen444` the user fetch data and as a result the `tab A`, `Tab B` and `Tab C` should reset to the root of the stack navigators and the app navigate back to `Screen44` in `Tab D`.\r\n\r\nThe stack should look like this:\r\n1. `Tab A`\r\n1.1 `Screen1`\r\n2. `Tab B`\r\n2.1 `Screen2`\r\n3. `Tab C`\r\n3.1 `Screen3`\r\n4. `Tab D`\r\n4.1 `Screen4`\r\n4.1.1 `Screen44`\r\n4.1.1.1 `Screen44`\r\n\r\n### Your Environment\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| react-navigation | 1.5.11\r\n| react-native     | 0.55.4\r\n| node             | 8.11.3\r\n| npm or yarn      | 1.7.0\r\n\r\n\r\nI tried using reset\r\n\r\n```\r\nexport default(navigation, 'mainStack`, [`Screen4`, `Screen44`]) => {\r\n    const resetAction = NavigationActions.reset({\r\n        index: 0,\r\n        key: null,\r\n        actions: [\r\n            NavigationActions.navigate({ routeName: 'mainStack` }),\r\n        ],\r\n    });\r\n    navigation.dispatch(resetAction);\r\n    if ([`Screen4`, `Screen44`]) {\r\n        [`Screen4`, `Screen44`].forEach(screenName =>\r\n            navigation.navigate(screenName));\r\n    }\r\n};\r\n```\r\n\r\nIt works ok, it a nice workaround.\r\nAll I want to see is the navigation back from `Screen444` to `Screen44`, but sometime the application is slow and I can see 2 navigations:\r\n1. `Screen444` to `Screen44`\r\n2. `Screen4` to `Screen44` <- this one is as a result from the workaround.\r\n\r\nIs there another way to reset tabs - `Tab A`, `Tab B` and `Tab C`?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/comments/416325729","html_url":"https://github.com/react-navigation/react-navigation/issues/4907#issuecomment-416325729","issue_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4907","id":416325729,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjMyNTcyOQ==","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-08-27T18:39:55Z","updated_at":"2018-08-27T18:39:55Z","author_association":"MEMBER","body":"hi! i see you went through a lot of trouble to put this issue together, thanks for writing it up. unfortunately we don't provide support for old react-navigation versions due to limited bandwidth. i'd suggest updating to the latest version and seeing if your issue is resolved. if it is not, then you can re-create this issue and link to a reproducible example that we can run on our machine, preferably on https://snack.expo.io for convenience. thanks and good luck!"}}
{"actor":{"display_login":"brentvatne"}}