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
Hi everyone,
I'm experiencing an issue where my route's pendingComponent is being triggered every time search parameters change, even when I have cached data available. I'd like the skeleton to only show on the initial load, not on subsequent searches/filters.
My Setup:
When users type in the search input (which updates the search URL param), the pendingComponent skeleton shows every time, creating a jarring experience. I want:
✅ Skeleton on initial page load (first visit)
❌ No skeleton when searching/filtering (should show existing data with a loading indicator)
Maybe i am doing something wrong, what is the better way to handle this case.
Should i use useQuery instead of useSuspenseQuery and handle loading manually or i still can use useSuspenseQuery but i must change something.
Any guidance would be much appreciated! Thanks for the amazing library 🙏
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm experiencing an issue where my route's pendingComponent is being triggered every time search parameters change, even when I have cached data available. I'd like the skeleton to only show on the initial load, not on subsequent searches/filters.
My Setup:
When users type in the search input (which updates the search URL param), the pendingComponent skeleton shows every time, creating a jarring experience. I want:
✅ Skeleton on initial page load (first visit)
❌ No skeleton when searching/filtering (should show existing data with a loading indicator)
Maybe i am doing something wrong, what is the better way to handle this case.
Should i use useQuery instead of useSuspenseQuery and handle loading manually or i still can use useSuspenseQuery but i must change something.
Any guidance would be much appreciated! Thanks for the amazing library 🙏
Environment:
@tanstack/react-query: ^5.85.3
@tanstack/react-router: ^1.121.2
Beta Was this translation helpful? Give feedback.
All reactions