'Why when 404.blade.php is opened I got error that $slot variable not found?

I have defined resources/views/errors/404.blade.php file in livewire 2, but I found that In layout file line with {{ $slot }} raise error that this variable not found. In my routes/web.php I defines rotes to livewire components , like

Route::get('/register', App\Http\Livewire\Register::class)->name('Register');

as 404.blade.php is not related component I suppose it raise error, but how that can be fixed ?

UPDATED PART :

My resources/views/errors/404.blade.php has no any slot defined :

<div class="container"  id="404_container">

    <div class="content">
        <x-h1 class=" error_text flex items-center justify-center flex-nowrap my-4 py-4">
            You entered invalid url !
        </x-h1>

        <div class="flex items-center justify-center m-5">
            <a class="cursor-pointer" href="{{ url('/') }}">Home</a>
        </div>
    </div>

</div>

I do not know is it valid content. I create my app with --jet option and livewire selected...

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source