Skip to content

Commit c45f85b

Browse files
authored
Docs - fix renamed properties (#1073)
1 parent 8d89d09 commit c45f85b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/usage/rtk-query/customizing-queries.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,15 @@ const api = createApi({
348348
// A queryFn returning an empty array is used, with contents being populated via
349349
// streaming updates below as they are received.
350350
queryFn: () => ({ data: [] }),
351-
async onCacheEntryAdded(arg, { updateCacheEntry, cleanup }) {
351+
async onCacheEntryAdded(arg, { updateCachedData, cacheEntryRemoved }) {
352352
const ws = new WebSocket('ws://localhost:8080')
353353
// populate the array with messages as they are received from the websocket
354354
ws.addEventListener('message', (event) => {
355-
updateCacheEntry((draft) => {
355+
updateCachedData((draft) => {
356356
draft.push(JSON.parse(event.data))
357357
})
358358
})
359-
await cleanup
359+
await cacheEntryRemoved
360360
ws.close()
361361
},
362362
}),

0 commit comments

Comments
 (0)