0

I am looking for a javascript animation api/library similar to that found in react-native - but that can be used outside of react-native.

The api is animating values - unrelated to the ui element. This is different from element.animate(opacity: 0.8) or view.animate(height: 20) since it allows to assign the animated value to anything.

const animateAnyValue = new Animated.Value(0);
const l = animateAnyValue.addListener((s) => {
    /* change any property on any ui element*/
});
Animated.spring(animateAnyValue, { toValue: 200 }).start(() => {
    // animateAnyValue.removeListener(l);
});

Unfortunately I can't import react-native into NativeScript - where I need to implement the animations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.