GuidesComponentsHelpers

withAnimated

Create a Reanimated-compatible wrapper for a component

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

withAnimated adapts a React component for Reanimated's animated component API. Use it when a third-party component needs animated style props and cannot be passed directly to Animated.createAnimatedComponent.

import { withAnimated } from "@ovok/native/helpers";
import { TextInput } from "react-native-paper";

const AnimatedTextInput = withAnimated(TextInput);

This helper only adapts the component type. It does not add animations or alter the wrapped component's behavior.

Last updated on