Abstraction Patterns for useQuery states #1826
Answered
by
TkDodo
rohitpotato
asked this question in
Q&A
-
The most typical way of rendering the component goes something like this:
This logic has to repeated for every component. Is there a way to extract this logic? What I mean by that is showing a loader until the query data loads and then displaying the real component with the data. Any such patterns where we dont have to write multiple Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Feb 19, 2021
Replies: 1 comment 13 replies
-
Enabling |
Beta Was this translation helpful? Give feedback.
13 replies
Answer selected by
rohitpotato
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enabling
suspense
would show thefallback
for loading and usesErrorBoundary
for errors.