-
Notifications
You must be signed in to change notification settings - Fork 507
Open
Labels
reactRelated to the react adapterRelated to the react adapter
Description
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...">
{lazyData.text}
</WhenVisible>
</div>;
}
Benjacho
Metadata
Metadata
Assignees
Labels
reactRelated to the react adapterRelated to the react adapter