facebook / react-strict-dom

React Strict DOM (RSD) is a subset of React DOM, imperative DOM, and CSS that supports web and native targets
MIT License
3.01k stars 150 forks source link

(feature) css.keyframes() and CSS animations #3

Open necolas opened 4 months ago

necolas commented 4 months ago

Describe the feature request

Support css.keyframes on native. We can use Animated to polyfill this API and the following CSS props:

burhanyilmaz commented 4 months ago

What you think about reanimated's keyframe animation? is it suitable for it? https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/keyframe-animations/

import { Keyframe } from 'react-native-reanimated';

const keyframe = new Keyframe({
  0: {
    transform: [{ rotate: '0deg' }],
  },
  100: {
    transform: [{ rotate: '45deg' }],
  },
});
import { Keyframe } from 'react-native-reanimated';

const keyframe = new Keyframe({
  from: {
    transform: [{ rotate: '0deg' }],
  },
  to: {
    transform: [{ rotate: '45deg' }],
  },
});