admin管理员组文章数量:1422281
I am new to react and have tried react animations. They work great when elements are added or removed in a TransitionGroup. But if I replace a single element with a similar one, react detects that the content of that element has changed and does not trigger an animation.
How can I fade out a single element and fade in a new one in the same place? For example fade out login-div, fade in dashboard-div.
I am new to react and have tried react animations. They work great when elements are added or removed in a TransitionGroup. But if I replace a single element with a similar one, react detects that the content of that element has changed and does not trigger an animation.
How can I fade out a single element and fade in a new one in the same place? For example fade out login-div, fade in dashboard-div.
Share Improve this question asked Feb 19, 2014 at 8:46 barabara 3,0642 gold badges28 silver badges25 bronze badges 1- did u tried jquery animation on elements how its behave ? Can u provide some fiddle. – Neha Commented Feb 19, 2014 at 8:51
1 Answer
Reset to default 6If your elements have different key
attributes, TransitionGroup will unmount one and mount the other.
You can read more about keys here: Composition vs Inheritance.
本文标签: javascriptfade out old elementfade in newStack Overflow
版权声明:本文标题:javascript - fade out old element, fade in new - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745364593a2655452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论