Tell us which versions you are using:
the renderNavigationBar static method on a scene component should receive the props of the component instance. E.g, the component is connected to redux store and you have access to the props of that component inside renderNavigationBar to affect the display of the NavBar
Only scene props are passed to renderNavigationBar
renderNavigationBar static to the component with props argumentprops in renderNavigationBar - No custom component props are availablei met the same situation of this method, i cannot dispatch action or update state, due to it is only a static method of component...
@willmcclellan @yutingjin I'm not sure whether this is a correct solution, but you could pass necessary props with Actions.refresh method:
static renderNavigationBar(props) {
props.propName
}
componentWillMount() {
Actions.refresh({propName: this.propName});
}
Hi,
Let's assign YourComponent.renderNavigationBar = NavigationBarComponent bellow your component class. It work ok.
Most helpful comment
i met the same situation of this method, i cannot dispatch action or update state, due to it is only a static method of component...