Level 2
Feb 5, 2026
1
Level 1
Livewire 4 @island inside a loop (foreach/forelse)
How to use @island inside a loop (@foreach / @forelse) in Livewire 4?
I’m experimenting with the new @island feature in Livewire 4, and I’m running into an issue when trying to use it inside a loop.
My use case is a Kanban-style board where columns are rendered dynamically using @foreach. Inside each column, I want to wrap part of the UI with @island so that it can be independently reactive.
Example
@foreach ($this->columns as $column)
<flux:card>
@island
<livewire:wishlists.items
:column-id="$column->id"
/>
@endisland
</flux:card>
@endforeach
The problem
Inside the @island, the $column variable (or $column->id) either:
- is not available / becomes
null, or - does not behave as expected when the loop updates
- There is this error:
Undefined variable $column
This raises a few questions:
- Does
@islandrequire all data to be passed explicitly via component properties? - Is it expected that variables from a Blade loop (
@foreach,@forelse) are not directly usable inside an island? - Is there a recommended pattern for using
@islandinside loops? For example: using a wrapper Livewire component per iteration?
What I’m trying to achieve
- Render multiple islands inside a loop
- Each island should be scoped to its own column
- Avoid unnecessary re-renders of other columns
Question
What is the correct or recommended way to use @island inside a loop in Livewire 4?
Is this a limitation by design, or am I missing a required pattern?
Any guidance or examples would be greatly appreciated ⚡
Please or to participate in this conversation.