react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
16 lines (11 loc) • 549 B
text/typescript
;
import { View } from 'react-native';
import { createAnimatedComponent } from '../createAnimatedComponent';
// Since createAnimatedComponent return type is ComponentClass that has the props of the argument,
// but not things like NativeMethods, etc. we need to add them manually by extending the type.
interface AnimatedViewComplement extends View {
getNode(): View;
}
// is-tree-shakable-suppress
export const AnimatedView = createAnimatedComponent(View);
export type AnimatedView = typeof AnimatedView & AnimatedViewComplement;