mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
fix: use interpolateNode in drawer to support Reanimated 2
This commit is contained in:
@@ -2,7 +2,16 @@ import * as React from 'react';
|
||||
import { Platform, StyleSheet } from 'react-native';
|
||||
import Animated from 'react-native-reanimated';
|
||||
|
||||
const { interpolate, cond, greaterThan } = Animated;
|
||||
const {
|
||||
interpolate: interpolateDeprecated,
|
||||
// @ts-ignore
|
||||
interpolateNode,
|
||||
cond,
|
||||
greaterThan,
|
||||
} = Animated;
|
||||
|
||||
const interpolate: typeof interpolateDeprecated =
|
||||
interpolateNode ?? interpolateDeprecated;
|
||||
|
||||
const PROGRESS_EPSILON = 0.05;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user