-
Notifications
You must be signed in to change notification settings - Fork 506
Open
Labels
needs more info/workNeeds more info from the author or additional work to get mergedNeeds more info from the author or additional work to get mergedreactRelated to the react adapterRelated to the react adapter
Description
@inertiajs/react Version
2.0.13
Backend stack (optional)
Laravel 12.20.x
PHP 8.4.x
Describe the problem
When upgrading the library from v2.0.12 to any newer version, the Deferred component (that was working perfectly fine before) it gets broken and enters in an infinite loading state when the user reloads the page. It doesn't happen when the users are using the navigation links.
Steps to reproduce
// backend
Route::get('/users', function () {
return Inertia::render('Users/Index', [
'users' => User::all(),
'roles' => Role::all(),
'permissions' => Inertia::defer(fn () => Permission::all()),
]);
});
// frontend
import { Deferred } from '@inertiajs/react'
export default () => (
<Deferred data="permissions" fallback={<div>Loading...</div>}>
<PermissionsChildComponent />
</Deferred>
)
- upgrade to
v2.0.13
- reload the page
Loading...
shows forever- downgrade to
v2.0.12
- reload the page
Loading...
shows for less than a sec
Metadata
Metadata
Assignees
Labels
needs more info/workNeeds more info from the author or additional work to get mergedNeeds more info from the author or additional work to get mergedreactRelated to the react adapterRelated to the react adapter