We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c519f7 commit 38825b9Copy full SHA for 38825b9
docs/rtk-query/usage/pagination.mdx
@@ -80,8 +80,15 @@ const PostList = () => {
80
81
If you have caching enabled for your paginated queries, it maybe a good idea to invalidate the `LIST` cache as well when you do a `delete` mutation.
82
83
-```ts title="src/features/services/post.ts
84
-// Or from '@reduxjs/toolkit/query' if not using the auto-generated hooks
+```ts title="Example of invalidating cache for paginated queries"
+// file: types.ts noEmit
85
+export interface Post {
86
+ id: number
87
+ name: string
88
+}
89
+
90
+// file: api.ts
91
+// Or from '@reduxjs/toolkit/query/react'
92
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
93
import { Post } from './types'
94
0 commit comments