Skip to content

Commit

Permalink
fix(useInfiniteScroll): fix reset may not work as expected when frequ…
Browse files Browse the repository at this point in the history
…ency is too high
  • Loading branch information
vikiboss committed Oct 23, 2024
1 parent 0022f5f commit c129047
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-use/src/use-infinite-scroll/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export function useInfiniteScroll<R = any, T extends HTMLElement = HTMLElement>(

const reset = useStableFn(() => {
previousReturn.current = undefined
isCalculating.current = false
incVersion()
updateRefState('loading', false)
updateRefState('isLoadDone', false)
Expand Down

0 comments on commit c129047

Please sign in to comment.