{"action":"created","issue":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1037","repository_url":"https://api.github.com/repos/aksonov/react-native-router-flux","labels_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1037/labels{/name}","comments_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1037/comments","events_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1037/events","html_url":"https://github.com/aksonov/react-native-router-flux/issues/1037","id":170104691,"number":1037,"title":"Set navigationBarStyle Dynamically in a Scene's Lifecycle Hook","user":{"login":"joncursi","id":4974609,"avatar_url":"https://avatars0.githubusercontent.com/u/4974609?v=3","gravatar_id":"","url":"https://api.github.com/users/joncursi","html_url":"https://github.com/joncursi","followers_url":"https://api.github.com/users/joncursi/followers","following_url":"https://api.github.com/users/joncursi/following{/other_user}","gists_url":"https://api.github.com/users/joncursi/gists{/gist_id}","starred_url":"https://api.github.com/users/joncursi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joncursi/subscriptions","organizations_url":"https://api.github.com/users/joncursi/orgs","repos_url":"https://api.github.com/users/joncursi/repos","events_url":"https://api.github.com/users/joncursi/events{/privacy}","received_events_url":"https://api.github.com/users/joncursi/received_events","type":"User","site_admin":false},"labels":[{"id":252407233,"url":"https://api.github.com/repos/aksonov/react-native-router-flux/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-09T08:01:57Z","updated_at":"2017-04-04T22:38:25Z","closed_at":"2016-08-11T22:34:24Z","body":"I want to theme my scenes based on data retrieved from a database. The same scene could render a nav bar that is pink, purple, blue, etc., based on what the user has configured in their settings.\n\nI do not know what the nav bar background color will be until the scene is called and data used to generate the scene is loaded, which I would prefer to write in the lifecycle hooks of the scene itself to keep all of the scene logic in one place, rather than scattered about.\n\nIs it possible to set `navigationBarStyle` dynamically at the scene itself, i.e. within a lifecycle hook once data is fetched, rather than having to define it upfront at the router level where `<Scene key=\"scene-name\" />` is defined?\n"},"comment":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/comments/291657426","html_url":"https://github.com/aksonov/react-native-router-flux/issues/1037#issuecomment-291657426","issue_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1037","id":291657426,"user":{"login":"OhaiBBQ","id":437360,"avatar_url":"https://avatars2.githubusercontent.com/u/437360?v=3","gravatar_id":"","url":"https://api.github.com/users/OhaiBBQ","html_url":"https://github.com/OhaiBBQ","followers_url":"https://api.github.com/users/OhaiBBQ/followers","following_url":"https://api.github.com/users/OhaiBBQ/following{/other_user}","gists_url":"https://api.github.com/users/OhaiBBQ/gists{/gist_id}","starred_url":"https://api.github.com/users/OhaiBBQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OhaiBBQ/subscriptions","organizations_url":"https://api.github.com/users/OhaiBBQ/orgs","repos_url":"https://api.github.com/users/OhaiBBQ/repos","events_url":"https://api.github.com/users/OhaiBBQ/events{/privacy}","received_events_url":"https://api.github.com/users/OhaiBBQ/received_events","type":"User","site_admin":false},"created_at":"2017-04-04T22:38:25Z","updated_at":"2017-04-04T22:38:25Z","body":"@mikaelrosquist No problem. One other thing I found interesting (as I'm new to React), was that you can set the default props of a RNRF Scene by using the `defaultProps` class property of a React Component.\r\n\r\n```js\r\nclass Scene extends RNRFScene { }\r\n\r\nScene.defaultProps = {\r\n  navBar: CircllyNavBar\r\n};\r\n```"}}
{"actor":{"display_login":"OhaiBBQ"}}