Skip to content

Commit 2964b91

Browse files
authored
Update usePrefetchImmediately snippet (#1710)
1 parent 24bbf9f commit 2964b91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/rtk-query/usage/prefetching.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ export function usePrefetchImmediately<T extends EndpointNames>(
8989
arg: Parameters<typeof api.endpoints[T]['initiate']>[0],
9090
options: PrefetchOptions = {}
9191
) {
92-
const dispatch = useDispatch()
92+
const dispatch = useAppDispatch()
9393
useEffect(() => {
94-
dispatch(api.util.prefetch(endpoint, arg, options))
94+
dispatch(api.util.prefetch(endpoint, arg as any, options))
9595
}, [])
9696
}
9797

0 commit comments

Comments
 (0)