How should I handle a leave animation in componentWillUnmount in React?

前端 未结 2 1707
走了就别回头了
走了就别回头了 2020-12-12 15:00

I was wondering if anyone could provide some insight about how they handle leave animations in React.js. I have been using Greensock TweenMax and the enter animations work f

2条回答
  •  醉酒成梦
    2020-12-12 15:48

    Check out React-Motion

    https://www.youtube.com/watch?v=1tavDv5hXpo

    Cheng Lou is a developer on the React team.

    He talks about the issues with the current ReactCSSTransitionGroup.

    He has developed React-Motion for fixing this issue.

    Although it doesn't use css transitions , it seems to perform well and is very deterministic. Where as ReactCSSTransitionGroup seems to be finicky as you cannot interrupt transitions.

提交回复
热议问题