Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index/use-swr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ export const useSWRHandler = <Data = any, Error = any>(

// Similar to the global mutate but bound to the current cache and key.
// `cache` isn't allowed to change during the lifecycle.
const boundMutate: SWRResponse<Data, Error>['mutate'] = useCallback(
const boundMutate = useCallback<SWRResponse<Data, Error>['mutate']>(
// Use callback to make sure `keyRef.current` returns latest result every time
(...args: any[]) => {
return internalMutate(cache, keyRef.current, ...args)
Expand Down
Loading