coryhouse / coryhouse/reactjsconsulting
react-query
- Dominant language
- JavaScript
- Stars
- 374
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
[Why you want react-query](https://tkdodo.eu/blog/why-you-want-react-query) - Long list of things that are easy to screw up in useEffect
[Configure error boundary at root](https://twitter.com/housecor/status/1633875496760135681)
[Colocate invalidate with query](https://x.com/housecor/status/1744449177960992854)
[If invalidating queries gets complex, just invalidate everything. But, can exclude infinite queries via a meta tag](https://x.com/TkDodo/status/1745326012328526094)
[Handle background query errors separately](https://tkdodo.eu/blog/react-query-error-handling#putting-it-all-together)
[Group reads and writes together in a custom hook](https://twitter.com/housecor/status/1666455020437401601)
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](https://twitter.com/housecor/status/1645400112120619009).
[You might not need RQ in Next if you're using RSC](https://twitter.com/alexdotjs/status/1666450458922057729)
Use [Orval](https://orval.dev/guides/react-query) to generate react-query calls from an OpenAPI spec.
[Strongly typed keys](https://twitter.com/ManssonEmric/status/1647157740459143169)
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.](https://twitter.com/housecor/status/1757823190855004506)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.