placeholderData and loading state #7944
Unanswered
bacarybruno
asked this question in
Q&A
Replies: 1 comment 1 reply
-
there should be a hard loading state when there is no data in the cache when the component mounts. Can you show an example? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Heyo everyone 👋
I want to apply
placeholderData: keepPreviousData
in the default options of my query client. I want to do it to avoid hard loading states when data is available. But apparently, definingplaceholderData: keepPreviousData
means that we'll never have a hard loading state.I still want to hard that hard loading state when the query is loading for the first time.
Or said differently, I want to apply
placeholderData: keepPreviousData
only after the first loading. Is it doable? 🙏Beta Was this translation helpful? Give feedback.
All reactions