internal async Task Navigate(bool backwards, bool firstRender)
        {
            var routeDateToUse = isActive ? RouteData : lastRouteData;

            Transition = Transition.Create(routeDateToUse, isActive, backwards, firstRender);

            if (invokesStateChanged)
            {
                StateHasChanged();
            }

            var canResetStateOnTransitionOut = ForgetStateOnTransition && !isActive;

            isActive      = !isActive;
            lastRouteData = RouteData;

            await Task.Yield();

            await TransitionInvoker.InvokeRouteTransitionAsync(backwards);

            if (canResetStateOnTransitionOut)
            {
                Transition = Transition.Create(routeData: null, Transition.IntoView, Transition.Backwards, Transition.FirstRender);
            }
        }
        internal async Task Navigate(bool backwards, bool firstRender)
        {
            var routeDateToUse = isActive ? RouteData : lastRouteData;

            Transition = Transition.Create(routeDateToUse, isActive, backwards, firstRender);

            if (invokesStateChanged)
            {
                StateHasChanged();
            }

            isActive      = !isActive;
            lastRouteData = RouteData;

            await Task.Yield();

            await TransitionInvoker.InvokeRouteTransitionAsync(backwards);
        }
        internal async Task Navigate(bool backwards, bool firstRender)
        {
            var routeDataToUse = isActive ? RouteData : lastRouteData;

            var switchedRouteData = (isActive ? lastRouteData : RouteData) ?? RouteData;

            Transition = Transition.Create(routeDataToUse, switchedRouteData, isActive, backwards, firstRender);

            if (invokesStateChanged)
            {
                StateHasChanged();
            }

            var canResetStateOnTransitionOut = ForgetStateOnTransition && !isActive;

            await Task.Yield();

            if (isActive)
            {
                await TransitionInvoker.InvokeRouteTransitionAsync(Transition);
            }

            isActive      = !isActive;
            lastRouteData = RouteData;

            if (canResetStateOnTransitionOut)
            {
                Transition = Transition.Create(routeData: null, switchedRouteData: null, Transition.IntoView, Transition.Backwards, Transition.FirstRender);
                await Task.Delay(TransitionDurationMilliseconds);

                if (invokesStateChanged)
                {
                    StateHasChanged();
                }
            }
        }