{"action":"created","issue":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4406","repository_url":"https://api.github.com/repos/react-navigation/react-navigation","labels_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4406/labels{/name}","comments_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4406/comments","events_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4406/events","html_url":"https://github.com/react-navigation/react-navigation/issues/4406","id":328721625,"node_id":"MDU6SXNzdWUzMjg3MjE2MjU=","number":4406,"title":"How to set navigationOptions from a Tab nested inside another Tab which in turn nested inside a Stack","user":{"login":"ravirajn22","id":10977864,"node_id":"MDQ6VXNlcjEwOTc3ODY0","avatar_url":"https://avatars3.githubusercontent.com/u/10977864?v=4","gravatar_id":"","url":"https://api.github.com/users/ravirajn22","html_url":"https://github.com/ravirajn22","followers_url":"https://api.github.com/users/ravirajn22/followers","following_url":"https://api.github.com/users/ravirajn22/following{/other_user}","gists_url":"https://api.github.com/users/ravirajn22/gists{/gist_id}","starred_url":"https://api.github.com/users/ravirajn22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravirajn22/subscriptions","organizations_url":"https://api.github.com/users/ravirajn22/orgs","repos_url":"https://api.github.com/users/ravirajn22/repos","events_url":"https://api.github.com/users/ravirajn22/events{/privacy}","received_events_url":"https://api.github.com/users/ravirajn22/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-02T07:17:27Z","updated_at":"2018-06-04T21:30:46Z","closed_at":"2018-06-04T21:30:46Z","author_association":"NONE","body":"Please forgive me for asking this question again, but I am unable to implement it properly with the way how navigationOptions is resolved in v2.0.0. Moreover you guys have started to lock the issue thread after closing. So I am not able to comment there and forced to open new issue. You could keep it unlocked for getting valid feedbacks or un detected bugs. \r\n\r\n# Current Behavior\r\n```\r\nconst RootNavigator = createStackNavigator (\r\n  HomeTabs: HomeTabs,\r\n  Screen1: normalScreen,\r\n  Screen2: normalScreen,\r\n  ....\r\n)\r\n\r\nconst HomeTabs = createBottomTabNavigator (\r\n  SubTab1: createMaterialTopTabNavigator,\r\n  SubTab2: createMaterialTopTabNavigator\r\n) \r\n```\r\ni.e Tabs nested inside Tabs nested inside parent Stack.\r\n\r\nPreviously I used to control the navigation options of the Stack from any deeply nested child, it was smooth and easy to understand once you know how it works.\r\n\r\nFor example, Say SubTab1 has two tabs, Profile and Rank. I need to change the header button, Title for Profile screen and Rank screen. How do I do it without performing heavy hacks?.\r\n\r\nNow with the changes in v2.0.0, I can't find the solution to this problem. Moreover, it's not a simple change like title, I also change the header, headerRight based on the nested screen. Moreover keeping navigationOptions at screen level is more intuitive then keeping it at the Navigator creation level.\r\n\r\nIf no easy solution, then as discussed in the RFC can you add the toggle for merging of navigationOptions from the nested child screens?\r\n\r\nKind of similar to these issues but I use nested TabNavigators which is in turn nested inside a StackNavigator,\r\n\r\n#4120\r\n#4159\r\n#4303\r\n#4310 \r\n\r\n\r\nI have made a simple snack, here I have solved the problem using your guidlines of Stacks over Tabs from docs. Please go through it and comment if is it the best way for setting navigationOptions for parent navigators.\r\nhttps://snack.expo.io/BJI1f6klQ\r\n\r\nThanks\r\n\r\n### Your Environment\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| react-navigation | 2.0.1\r\n| react-native     | 0.55.3\r\n"},"comment":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/comments/394506273","html_url":"https://github.com/react-navigation/react-navigation/issues/4406#issuecomment-394506273","issue_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/4406","id":394506273,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDUwNjI3Mw==","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-04T21:30:46Z","updated_at":"2018-06-04T21:30:46Z","author_association":"MEMBER","body":"if this doesn't work for you then let me know."}}
{"actor":{"display_login":"brentvatne"}}