Skip to content

Commit

Permalink
refactor: fix a react-hooks warning
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Mar 10, 2021
1 parent 58546fc commit 90b5548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/use-swr-infinite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function useSWRInfinite<Data = any, Error = any>(
}
return mutate(v => v)
},
[pageCountCacheKey, resolvePageCount]
[pageCountCacheKey, resolvePageCount, mutate]
)

// Use getter functions to avoid unnecessary re-renders caused by triggering all the getters of the returned swr object
Expand Down

0 comments on commit 90b5548

Please sign in to comment.