How to use the @reach/router.globalHistory._onTransitionComplete function in @reach/router

To help you get started, we’ve selected a few @reach/router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / BotFramework-Composer / Composer / packages / client / src / pages / design / index.js View on Github external
useEffect(() => {
    if (match) {
      const { dialogId, uri } = match;
      const params = new URLSearchParams(location.search);
      setDesignPageLocation({
        dialogId: dialogId,
        uri: uri,
        focusedEvent: params.get('focusedEvent'),
        focusedSteps: params.getAll('focusedSteps[]'),
        breadcrumb: location.state ? location.state.breadcrumb || [] : [],
      });
      globalHistory._onTransitionComplete();
    }
  }, [location]);