Skip to content

Commit

Permalink
fix(useReachBottom.taro): 立即触发一次回调有误
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 10, 2020
1 parent e8cae3d commit 71323b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/react/useReachBottom.taro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export const useReachBottom: typeof _useReachBottom = (
const ref = useRef<any>()

// 立即触发一次回调
useEffect(callback, [])
useEffect(() => {
callback()
}, [])

useTaroReachBottom(callback)

Expand Down

0 comments on commit 71323b0

Please sign in to comment.