-
Notifications
You must be signed in to change notification settings - Fork 515
Open
Description
Inertia adapter(s) affected
- React
- Vue 3
- Svelte
- Not Applicable
JS package version
"@inertiajs/react": "^2.0.14",
Backend stack (optional)
Laravel 11
Describe the problem
I am running into an issue, where if I use 'data' => Inertia::defer(fn() => $data)
, it gets lazy loaded fine. But if I then visit some other site, and click the browsers "back" button, the deffered data wont load.
It works if i use 'data' => Inertia::otpional(fn() => $data)
and
useEffect(() => {
router.reload(["data"]);
}, []);
Is anyone else getting this and is this expected?
Steps to reproduce
- Pass data with defer
'data' => Inertia::defer(fn() => $data)
- Open page (loads fine)
- Open any other page, like google.com
- Press browser back, deferred props wont load
Metadata
Metadata
Assignees
Labels
No labels