[SOLVED] Livewire Installed But Laravel Livewire Not Rendering

[SOLVED] Livewire Installed But Laravel Livewire Not Rendering

After downloading the checked-in code from Github to a new system, I noticed that Livewire was not rendering. Instead, I was seeing the @livewireStyles, @livewireScripts, and @livewire(‘my-livewire-component’) on the blade page where the Livewire component was supposed to be displayed.

I tried running composer dump-autoload. clearing the cache by running php artisan co:cache but nothing helped!

Finally what worked was a funny approach.

The Solution To Laravel Livewire components not rendering on page

I opened my layouts file where both @livewireStyles and @livewireScripts were called and made some random change (added a space) and then saved the file.

I then refresh the page and voila!

The @livewireStyles and @livewireScripts were gone from the page!

But the Livewire component was still not rendering.

So, I now went to the blade file where I had referred to the Livewire component, made some random change, and then, saved the file.

Then, I went back to my browser and just like that, everything worked just fine! Phew!

Share This Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe To my Future Posts

Get notified whenever I post something new

More To Explore