TanStackT
TanStack16mo ago
4 replies
awake-maroon

Delay isPending render

Typical code:
if(isPending) return (<LoadingSpinner />


If my query is fast, this results in some flashing (imagine skeletons etc.)

I was wondering if some of you did some sort of delay (like 0.1s) before rendering the skeleton). How did you do it?

This could have these advantages: no flashing, no unnecessary render, better accessibility.
Was this page helpful?