react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
15 lines (13 loc) • 485 B
text/typescript
import type { ReanimatedHTMLElement } from '../js-reanimated';
import { _updatePropsJS } from '../js-reanimated';
import type { StyleProps } from '../commonTypes';
import type { AnimatedRef } from '../hook/commonTypes';
import type { Component } from 'react';
export function setNativeProps<T extends Component>(
animatedRef: AnimatedRef<T>,
updates: StyleProps
) {
const component = animatedRef() as ReanimatedHTMLElement;
_updatePropsJS(updates, component);
}
;