亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - How to write animation effects in react?
世界只因有你
世界只因有你 2017-05-18 10:58:34
0
2
861

How to write animation effects for components in react? For example, for a simple dialog box, I hope that after clicking Cancel, the dialog box will first fade and then disappear.
If you use jquery, it is very simple, first animate({ //Fade CSS}, function(){ //Delete DOM}).

But react, I don’t know how to do it. Could it be that the entire component dom exists, and only a CSS animation is used to switch the display and hide?

Please give me some advice

世界只因有你
世界只因有你

reply all(2)
Ty80

In most cases, DOM operations are not required, use React Add-OnsReactCSSTransitionGroup組件或ReactTransitionGroupcomponents:

  • React animation

曾經(jīng)蠟筆沒(méi)有小新

You can reference jq in componentDidMount in the react component and then write the animation

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template