Skip to content

Commit

Permalink
feat: added expo compatibility support
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Aug 22, 2020
1 parent f38c6c6 commit 2c3d545
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion example/src/screens/BasicExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, { useCallback, useMemo, useRef } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import { useHeaderHeight } from '@react-navigation/stack';
import Animated, {
useValue,
interpolate,
concat,
Extrapolate,
} from 'react-native-reanimated';
import { useValue } from 'react-native-redash';
import BottomSheet from '@gorhom/bottom-sheet';
import Handle from '../components/handle';
import Button from '../components/button';
Expand Down
7 changes: 2 additions & 5 deletions example/src/screens/MapExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ import {
} from 'react-native';
import MapView from 'react-native-maps';
import { BlurView } from '@react-native-community/blur';
import Animated, {
useValue,
interpolate,
Extrapolate,
} from 'react-native-reanimated';
import Animated, { interpolate, Extrapolate } from 'react-native-reanimated';
import { useValue } from 'react-native-redash';
import { useSafeArea } from 'react-native-safe-area-context';
import BottomSheet, { BottomSheetScrollView } from '@gorhom/bottom-sheet';
import SearchHandle from '../components/searchHandle';
Expand Down
7 changes: 2 additions & 5 deletions example/src/screens/ShadowOverlayExample.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React, { useCallback, useMemo, useRef } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import { useHeaderHeight } from '@react-navigation/stack';
import Animated, {
useValue,
interpolate,
Extrapolate,
} from 'react-native-reanimated';
import Animated, { interpolate, Extrapolate } from 'react-native-reanimated';
import { useValue } from 'react-native-redash';
import BottomSheet from '@gorhom/bottom-sheet';
import Button from '../components/button';
import ContactList from '../components/contactList';
Expand Down
2 changes: 1 addition & 1 deletion src/components/bottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import {
State,
} from 'react-native-gesture-handler';
import {
usePanGestureHandler,
useValue,
usePanGestureHandler,
useTapGestureHandler,
// ReText,
} from 'react-native-redash';
Expand Down
3 changes: 1 addition & 2 deletions src/components/bottomSheet/useTransition.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Animated, {
eq,
useValue,
set,
add,
greaterOrEq,
Expand All @@ -20,7 +19,7 @@ import Animated, {
// debug,
} from 'react-native-reanimated';
import { State } from 'react-native-gesture-handler';
import { useClock, snapPoint } from 'react-native-redash';
import { useClock, useValue, snapPoint } from 'react-native-redash';
import type { BottomSheetAnimationConfigs } from './types';

interface TransitionProps extends Required<BottomSheetAnimationConfigs> {
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/useScrollable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
ScrollView,
SectionList,
} from 'react-native';
import Animated, { useValue } from 'react-native-reanimated';
import Animated from 'react-native-reanimated';
import { useValue } from 'react-native-redash';
import type { ScrollableRef, Scrollable } from '../types';

export const useScrollable = () => {
Expand Down
10 changes: 2 additions & 8 deletions src/hooks/useScrollableInternal.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { useCallback, useRef, useMemo } from 'react';
import { findNodeHandle } from 'react-native';
import {
useValue,
event,
useCode,
onChange,
set,
call,
} from 'react-native-reanimated';
import { event, useCode, onChange, set, call } from 'react-native-reanimated';
import { useValue } from 'react-native-redash';
import { useBottomSheetInternal } from '../hooks/useBottomSheetInternal';
import type { Scrollable, ScrollableType } from '../types';

Expand Down

0 comments on commit 2c3d545

Please sign in to comment.