You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ConferenceNavigationContainerRef.ts 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { NavigationContainerRef } from '@react-navigation/native';
  2. import React from 'react';
  3. export const conferenceNavigationRef = React.createRef<NavigationContainerRef<any>>();
  4. /**
  5. * User defined navigation action included inside the reference to the container.
  6. *
  7. * @param {string} name - Destination name of the route that has been defined somewhere.
  8. * @param {Object} params - Params to pass to the destination route.
  9. * @returns {Function}
  10. */
  11. export function navigate(name: string, params?: Object) {
  12. return conferenceNavigationRef.current?.navigate(name, params);
  13. }
  14. /**
  15. * User defined navigation action included inside the reference to the container.
  16. *
  17. * @returns {Function}
  18. */
  19. export function goBack() {
  20. return conferenceNavigationRef.current?.goBack();
  21. }
  22. /**
  23. * User defined navigation action included inside the reference to the container.
  24. *
  25. * @param {Object} params - Params to pass to the destination route.
  26. * @returns {Function}
  27. */
  28. export function setParams(params: Object) {
  29. return conferenceNavigationRef.current?.setParams(params);
  30. }