UNPKG

1.01 kBTypeScriptView Raw
1import type { DependencyList } from './commonTypes';
2/**
3 * Lets you to respond to changes in a [shared
4 * value](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#shared-value).
5 * It's especially useful when comparing values previously stored in the shared
6 * value with the current one.
7 *
8 * @param prepare - A function that should return a value to which you'd like to
9 * react.
10 * @param react - A function that reacts to changes in the value returned by the
11 * `prepare` function.
12 * @param dependencies - An optional array of dependencies. Only relevant when
13 * using Reanimated without the Babel plugin on the Web.
14 * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useAnimatedReaction
15 */
16export declare function useAnimatedReaction<PreparedResult>(prepare: () => PreparedResult, react: (prepared: PreparedResult, previous: PreparedResult | null) => void, dependencies?: DependencyList): void;
17//# sourceMappingURL=useAnimatedReaction.d.ts.map
\No newline at end of file