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
Check both isLoading and isError to narrow data. If you only check one, data may be undefined. If you're using useErrorBoundary, then you can use a pattern like this: create custom wrappers by hand.
Why you want react-query - Long list of things that are easy to screw up in useEffect
Configure error boundary at root
Colocate invalidate with query
If invalidating queries gets complex, just invalidate everything. But, can exclude infinite queries via a meta tag
Handle background query errors separately
Group reads and writes together in a custom hook
Check both isLoading and isError to narrow data. If you only check one, data may be undefined. If you're using
useErrorBoundary
, then you can use a pattern like this: create custom wrappers by hand.You might not need RQ in Next if you're using RSC
Use Orval to generate react-query calls from an OpenAPI spec.
Strongly typed keys
https://www.thisdot.co/blog/common-patterns-and-nuances-using-react-query/
Use setQueryData to pre-populate the detail page cache. Now the detail page loads immediately.
The text was updated successfully, but these errors were encountered: