use_animation_with_dependencies

Function use_animation_with_dependencies 

pub fn use_animation_with_dependencies<Animated, D>(
    dependencies: &D,
    run: impl FnMut(&mut AnimConfiguration, &D) -> Animated + 'static,
) -> UseAnimation<Animated>
where Animated: AnimatedValue, D: 'static + Clone + PartialEq,
Expand description

Like use_animation but supports passing manual dependencies.

fn app() -> impl IntoElement {
    let animation = use_animation_with_dependencies(&other_value, |conf, other_value| {
        conf.on_change(OnChange::Rerun);
        AnimNum::new(0., *other_value).time(50)
    });

    // ...
}