feat(rn,app) unified navigators

This commit is contained in:
Calinteodor
2022-01-25 14:55:57 +02:00
committed by GitHub
parent 49dd007167
commit b9433368ee
49 changed files with 229 additions and 318 deletions

View File

@@ -0,0 +1,19 @@
// @flow
import React from 'react';
// $FlowExpectedError
export const rootNavigationRef = React.createRef();
/**
* User defined navigation action included inside the reference to the container.
*
* @param {string} name - Destination name of the route that has been defined somewhere.
* @param {Object} params - Params to pass to the destination route.
* @returns {Function}
*/
export function navigateRoot(name: string, params: Object) {
// $FlowExpectedError
return rootNavigationRef.current?.navigate(name, params);
}