We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following if statement blocks loading new page if page is already loading.
if
const handleLoadPage = useCallback(async (page: number, clearCache: boolean) => { if (loading.includes(page)) return;
This makes pages not load on filter changes if loading is longer than expected, for example:
This line was added to reduce number of repeated requests during table re-rendering when page is already loading - bad implementation.
Always load last requested page even if already loading, discard old page load data when promise resolved and only keep last requested.
useEffect(() => { let ignore = false; try { const data = await getData(); if (!ignore) { setData(data); } } catch(err) { if (!ignore) { throw err; } } return () => { ignore = true; }; }, [prop1, prop2, prop3]);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
The following
if
statement blocks loading new page if page is already loading.This makes pages not load on filter changes if loading is longer than expected, for example:
Proposed solution
This line was added to reduce number of repeated requests during table re-rendering when page is already loading - bad implementation.
Always load last requested page even if already loading, discard old page load data when promise resolved and only keep last requested.
The text was updated successfully, but these errors were encountered: