leptos_animate 0.1.14

Animation utilities for Leptos. FLIP, in/out transitions, and helpers for custom animations.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use futures::channel;
use leptos::prelude::request_animation_frame;

pub async fn animation_frame() {
    let (tx, rx) = channel::oneshot::channel();

    request_animation_frame(move || {
        request_animation_frame(move || {
            tx.send(()).unwrap();
        });
    });

    rx.await.unwrap();
}