You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree, it shouldn't prefetch deferred props, as that may take a long time while in the meantime the user could navigate, which would then cause the page to load very slowly
It should load deferred props too, but as a second request (like how prefetch works normally).
For example, I assume that if a user is hovering over Paginator links chances are they want to click the next page or the page number over which they are hovering.
This works fine except if the page has deferred components, it looks like prefetch does prefetch the initial data, but doesn't seem to go back for the deferred data. The problem with this is now that if a user clicks on a page then nothing shows at all.
Version:
@inertiajs/react
version: 2.0.0-beta.2Describe the problem:
When I prefetch a
<Link prefetch/>
it only loads props that don't have theInertia::defer
method.Steps to reproduce:
Controller:
return inertia('Dashboard/Products/Inventory', [ 'shop' => $shop, 'inventory' => Inertia::defer(fn() => $shop->inventory), ]);
Frontened:
<Link prefetch href={route("inventory")} className="flex gap-2 items-center"> <span className="font-medium text-white">Inventory</span> </Link>
The text was updated successfully, but these errors were encountered: