I have an app that is being updated from react navigation 2 to react navigation 5 and was wondering how to access the navigation prop outside of a screen component. For example in RN2 we were given NavigationActions which allowed us to do:
import { StackActions, NavigationActions } from 'react-navigation';
NavigationActions.navigate({ routeName })
This was helpful when dealing with a file that used redux-saga or redux-form as we could navigate based on the logic.
Is there something similar in RN5 I can use to make this possible?