gxsshallot / react-native-pure-navigation-bar

A fully customizable navigation bar in React Native.
MIT License
96 stars 19 forks source link

Invariant Violation: withNavigation can only be used on a view hierarchy of a navigator. The wrapped component is unable to get access to navigation from props or context. #6

Closed trinadhkoya closed 5 years ago

trinadhkoya commented 5 years ago

Not able to run this , can you look into this and close it ASAP

gxsshallot commented 5 years ago

If you are using it in a view not in navigator, you can import { InnerNaviBar } from 'react-native-pure-navigation-bar'. It is the component without withNavigation. And you can set leftElement={null} to disable default back button, or set onLeft={() => { do(); return false; }} to override default goback action of back button.