react-component / motion

⛷ CSS Animation for React
https://motion-seven.vercel.app
MIT License
146 stars 41 forks source link

feat: Support onVisibleChanged #7

Closed zombieJ closed 4 years ago

zombieJ commented 4 years ago

大部分单独使用场景都可以通过依赖 onVisibleChanged 来判断元素是否已经完成隐藏。但是对于如虚拟滚动这种可能会自行删除的 Node 则需要额外判断。

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/motion/p3k6ghy6k
✅ Preview: https://motion-git-onvisiblechanged.react-component.vercel.app

codecov[bot] commented 4 years ago

Codecov Report

Merging #7 into master will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage   98.57%   98.59%   +0.01%     
==========================================
  Files          11       12       +1     
  Lines         352      356       +4     
  Branches       92       93       +1     
==========================================
+ Hits          347      351       +4     
  Misses          5        5              
Impacted Files Coverage Δ
src/CSSMotion.tsx 100.00% <ø> (ø)
src/interface.ts 100.00% <ø> (ø)
src/CSSMotionList.tsx 100.00% <100.00%> (ø)
src/hooks/useState.ts 100.00% <100.00%> (ø)
src/hooks/useStatus.ts 100.00% <100.00%> (ø)
src/hooks/useStepQueue.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 793429a...01c7451. Read the comment docs.