You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WhenVisible component has a useEffect that makes use of the params prop by calling getReloadParams. However the prop is not in the dependency array of the useEffect resulting in changes in the params never actually being used. This makes it not possible to implement infinite scroll for instance.
Steps to reproduce:
The observer is never recreated because the effect isn't being run because of the missing dependencies in the array.
So this won't work. The data will become stale after the first fetch.
Version:
@inertiajs/react
version: 2.0.0Describe the problem:
The WhenVisible component has a useEffect that makes use of the
params
prop by callinggetReloadParams
. However the prop is not in the dependency array of the useEffect resulting in changes in the params never actually being used. This makes it not possible to implement infinite scroll for instance.Steps to reproduce:
The observer is never recreated because the effect isn't being run because of the missing dependencies in the array.
So this won't work. The data will become stale after the first fetch.
The text was updated successfully, but these errors were encountered: