Update docs related to react-query
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently in the docs https://mswjs.io/docs/faq#react-query the method to clear query cache is outdated with ver3 released.
Describe the solution you’d like
We need to replace
import { queryCache } from 'react-query'
beforeEach(() => {
queryCache.clear()
})
with
let queryClient: QueryClient;
beforeEach(() => {
queryClient = new QueryClient();
});
afterEach(() => {
queryClient.clear();
});
Describe alternatives you’ve considered
🤔
Additional context
- https://react-query.tanstack.com/guides/migrating-to-react-query-3 (I was just trying to migrate from react-query v2 to v3 & noticed the difference in docs 😄 )
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
React Query - Hooks for fetching, caching and updating ...
Performant and powerful data synchronization for React. Fetch, cache and update data in your React and React Native applications all without touching any ......
Read more >Fetching and Updating Data with React Query
In this article, we will discuss using React Query in React applications, and learn how to fetch and update a list of users...
Read more >Building The Real App With React Query - Smashing Magazine
React Query has an impressive list of features: caching;; deduping multiple requests for the same data into a single request;; updating “out ...
Read more >How to Query through a list of documents and then update the ...
I would like to change the name of every state that named boston in my collection of document in firestore how can I...
Read more >Getting Started with React-Query for Data Fetching and State ...
Using React Query, we can fetch, cache, and update data in React-based applications in a simple and declarative manner without mutating the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will make a PR for it today 👍
Fixed by https://github.com/mswjs/mswjs.io/pull/127. The page is now live. Thank you once more. @adeelibr.