Eval + javascript library: doesn't respect the animation execution #3726
-
Hi, Dioxus 0.6.x
I tried to mimick what is written here: The issue is that part of the code is not executed. The animation visually is executed. I increased the animation duration on purpose. What's wrong? Looks like the component is unmounted while the async function is still running. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I was also using motion library to animate few stuffs back in the day. It was pain to work with (I did somehow managed to make it work for web, most animations wasnt working on desktop). Then i created an entire library for basic animations. If you use case is not huge, i will consider you to use that library. You can check how i am doing the transform animations https://github.com/wheregmis/dioxus-motion/blob/main/example_projects/src/components/transform_animation.rs here. But if you want to use motion.js. You can check the implementation https://github.com/wheregmis/wheregmis.github.io/tree/bf152cd234b34e632c40e654fc7deefc58342a57 I had alot of animations working for my portfolio. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to use the motion library to animate a div when clicked, but the animation sequence doesn't seem to execute as expected. Specifically, after running await anim0 and await anim1, the part of the code that sends a message (dioxus.send(1)) isn't triggered as expected |
Beta Was this translation helpful? Give feedback.
I was also using motion library to animate few stuffs back in the day. It was pain to work with (I did somehow managed to make it work for web, most animations wasnt working on desktop). Then i created an entire library for basic animations. If you use case is not huge, i will consider you to use that library. You can check how i am doing the transform animations https://github.com/wheregmis/dioxus-motion/blob/main/example_projects/src/components/transform_animation.rs here. But if you want to use motion.js. You can check the implementation https://github.com/wheregmis/wheregmis.github.io/tree/bf152cd234b34e632c40e654fc7deefc58342a57 I had alot of animations working for my portfolio.