verdnatura-chat/app/lib/ModalNavigation.js

22 lines
345 B
JavaScript

import { NavigationActions } from 'react-navigation';
let _navigatorModal;
function setTopLevelNavigator(navigatorRef) {
_navigatorModal = navigatorRef;
}
function navigate(routeName, params) {
_navigatorModal.dispatch(
NavigationActions.navigate({
routeName,
params
})
);
}
export default {
navigate,
setTopLevelNavigator
};