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.js 985B

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