import { useEffect, useRef } from 'react' import { useSharedValue } from 'react-native-reanimated' import { PackageName } from '../constants' import type { InternalControllerState, UseAnimationState, UseAnimationStateConfig, Variants, } from '../types' /** * * `useAnimatedState` lets you control your animation state, based on static presets. It is the most performant way to drive animations. * * @param variants specify your style variants. * @param config Optionally define your from variant key. * * **Example** * * ```jsx * import { useAnimationState, View } from 'moti' * * const animator = useAnimationState({ * from: { * opacity: 0 * }, * open: { * opacity: 1 * }, * pressed: { * opacity: 0.7 * } * }) * * return ( * <> * *