Skip to main content
Version: 2.x


NavigationContext provides the navigation object (similar to the navigation prop). In fact, withNavigation uses this context to inject the navigation prop to your wrapped component. The hook counterpart is essentially an useContext with this context as well.

Most of the time, you won't use NavigationContext directly, as the provided withNavigation already cover most use cases. But just in case you have something else in mind, NavigationContext is available for you to use.