Skip to content

v2.0.13 breaks Deferred component in React, infinite load when reloading the page, on FireFox #2427

@RazvanRauta

Description

@RazvanRauta

@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

No one assigned

    Labels

    needs more info/workNeeds more info from the author or additional work to get mergedreactRelated to the react adapter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions