Skip to main content

Delay Some Component Loading with wire:init

Premium
1:28

The Full Lesson is Only for Premium Members

Want to access all of our courses? (36 h 00 min)

You also get:

61 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

bitvalentine avatar

I tried wire:init like in this demo. However I have 2 inits with different endpoints with loading text.

The problem I'm seeing is that both inits need to be collected before showing the data. For example:

I have 1 init checking the database and I have another init that pulls from an API. The db init will not display until the API init is completed.

Povilas Korop avatar

I don't think I have a solution for this, never tried multiple wire:init, not even sure Livewire supports/recommends it.