Redirect to livewire component doesnt trigger error

I am trying to redirect to a livewire component, but the error is not being shown. I fill the error based on a ErrorMessage livewire component

This is what I am trying to do in the mount() of my OrderForm
if (Route::getRoutes()->match(Request::create(request()->session()->previousUrl()))->getName() === 'orders.confirmation') {
            $this->dispatch(
                event: 'error',
                error: 'Er is iets misgegaan met de betaling. Probeer het later opnieuw.'
            );
        }


Is this the right moment to do the dispatch?
Was this page helpful?