Skip to content

WhenVisible broke on reload #2388

Open
@chack1172

Description

@chack1172

Reloading the page or on form errors, WhenVisible breaks because the state loaded remains to true but the page prop is missing.

Example:

const App = () => {
    const { lazyData } = usePage().props;

    useEffect(() => {
        setTimeout(() => {
            router.reload();
        }, 5000);
    });

    return <div>
        <WhenVisible data="lazyData" fallback="Loading...">
            {lazyLoad.text}
        </WhenVisible>
    </div>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    reactRelated to the react adapter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions