verdnatura-chat/app/lib/ShareNavigation.js

22 lines
345 B
JavaScript
Raw Normal View History

2019-07-29 16:33:28 +00:00
import { NavigationActions } from 'react-navigation';
let _shareNavigator;
function setTopLevelNavigator(navigatorRef) {
_shareNavigator = navigatorRef;
}
function navigate(routeName, params) {
_shareNavigator.dispatch(
NavigationActions.navigate({
routeName,
params
})
);
}
export default {
navigate,
setTopLevelNavigator
};