Skip to content

NotInNavigator

shallot edited this page Dec 26, 2018 · 1 revision

Not In Navigator

Referenced Issue: 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.

If you are using it in a view not in navigator, you can import component like this:

import { InnerNaviBar } from 'react-native-pure-navigation-bar';

It is the component without withNavigation wrapper. 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.

Clone this wiki locally