timomeh / react-native-material-bottom-navigation

💅🔧👌 a beautiful, customizable and easy-to-use material design bottom navigation for react-native
MIT License
709 stars 127 forks source link

Navigate between screens #30

Closed JVRodrigues256 closed 7 years ago

JVRodrigues256 commented 7 years ago

Hello everyone, I'm using react-native-material-bottom-navigation to navigate between screens in my application, however I do not know how to take the user to another screen when clicking a button, 'onPress' does not seem to work.

Does anyone know how I can take the user to another screen?

timomeh commented 7 years ago

You can listen to changes of the active Tab with the onTabChange prop. There's an example in the README along with all available configs.

In this callback you can change the active screen.

There's also an example for handling tabChange in a stateful component, which can come handy.