i notice that whenever i use with on multiple pages (generated by folio), an error occured which seems like i use the same component. However i am using 2 different pages. I didn't even use wire:navigate or anything. Just normal redirect.
I don't know for sure if this is desired behavior of volt or a bug. Since to me, using folio is the same as traditional web navigation and also means different pages which should be also different component as well.
Steps To Reproduce
Install fresh laravel
Composer require & install Livewire, Volt & Folio
Create 2 folio pages, such as php artisan make:folio employer/index and php artisan make:folio employee/index
Add these code on both pages
use function Livewire\Volt\{with}; with(fn() => [ 'testdata' => Testdata::all() ]);
The error will show The "with" function may only be invoked once per component.
Volt Version
1.0
Laravel Version
10.21.0
PHP Version
8.2.4
Database Driver & Version
8.0.30
Description
I am using Laravel + Folio + Volt.
i notice that whenever i use
with
on multiple pages (generated by folio), an error occured which seems like i use the same component. However i am using 2 different pages. I didn't even use wire:navigate or anything. Just normal redirect.I don't know for sure if this is desired behavior of volt or a bug. Since to me, using folio is the same as traditional web navigation and also means different pages which should be also different component as well.
Steps To Reproduce
php artisan make:folio employer/index
andphp artisan make:folio employee/index
use function Livewire\Volt\{with}; with(fn() => [ 'testdata' => Testdata::all() ]);
The "with" function may only be invoked once per component.