class TestItem extends Component
{
public $item;
public function mount($item)
{
$this->item = $item;
}
public function render()
{
return view('livewire.test-item', ['item' => $this->item]);
}
}
If $item is a public property on the Component class, then you should not also pass item as data to the view template:
class TestItem extends Component
{
public $item;
public function mount($item)
{
$this->item = $item;
}
public function render()
{
return view('livewire.test-item');
}
}