Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

RootNavigationContainerRef.js 535B

12345678910111213141516171819
  1. // @flow
  2. import React from 'react';
  3. // $FlowExpectedError
  4. export const rootNavigationRef = React.createRef();
  5. /**
  6. * User defined navigation action included inside the reference to the container.
  7. *
  8. * @param {string} name - Destination name of the route that has been defined somewhere.
  9. * @param {Object} params - Params to pass to the destination route.
  10. * @returns {Function}
  11. */
  12. export function navigate(name: string, params: Object) {
  13. // $FlowExpectedError
  14. return rootNavigationRef.current?.navigate(name, params);
  15. }