Hi~How to use renderNavigationBar(props) method? I implement it in my class,but it does not work. Can you give a example for it? thank you.
I found
childrenState.component.renderNavigationBar
is undefine
in NavBar.js
Have you provided static renderNavigationBar method for your component? Then it cannot be undefined...
class Login extends React.Component {
renderNavigationBar(props){
return
}
render(){
return (
<View style={[styles.container, this.props.style]}>
<Text>Login page: {this.props.data}</Text>
<Button onPress={Actions.loginModal}>Login 2</Button>
<Button onPress={Actions.pop}>Back</Button>
</View>
);
}
}
Here is my demo code, it's not work for renderNavigationBar.
Ugh, method is not static....
I see~ thank you very much.
In my case, the navBar is rendered at the bottom of the page, rather than the top. tried removing all styles from the top/wrapping view of my component, without luck.
Also, I was trying to pass down my redux states, but it seems it isn't part of the props passed to the static method :/
I know this is an old issue. But I get navBar is rendered at the bottom of the page. Tested on latest version (3.36.0)
The only way I could get the navbar to render at the top was to absolute position it like this, and set a height:
position: 'absolute',
top: 0,
left: 0,
right: 0
Most helpful comment
In my case, the navBar is rendered at the bottom of the page, rather than the top. tried removing all styles from the top/wrapping view of my component, without luck.
Also, I was trying to pass down my redux states, but it seems it isn't part of the
propspassed to the static method :/