Skip to content

Commit aa4e625

Browse files
committed
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit into gitattributes
2 parents 575919c + 9577c69 commit aa4e625

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/usage/nextjs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ It is worth noting that initializing the store with a `useEffect` would not work
380380

381381
### Caching
382382

383-
The App Router has four seperate caches including `fetch` request and route caches. The most likely cache to cause issues is the route cache. If you have an application that accepts login you may have routes (e.g. the home route, `/`) that render different data based on the user you will need to disable the route cache by using the [`dynamic` export from the route handler](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic):
383+
The App Router has four separate caches including `fetch` request and route caches. The most likely cache to cause issues is the route cache. If you have an application that accepts login you may have routes (e.g. the home route, `/`) that render different data based on the user you will need to disable the route cache by using the [`dynamic` export from the route handler](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic):
384384

385385
```ts
386386
export const dynamic = 'force-dynamic'

packages/toolkit/src/query/core/buildThunks.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ export function buildThunks<
321321
}
322322
}
323323

324+
if (ret.patches.length === 0) {
325+
return ret
326+
}
327+
324328
dispatch(
325329
api.util.patchQueryData(
326330
endpointName,

0 commit comments

Comments
 (0)