Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import React from 'react';
import {
Text,
View,
StyleSheet,
SectionList,
Platform,
LogBox,
} from 'react-native';
import { Text, View, StyleSheet, SectionList, Platform } from 'react-native';
import {
createStackNavigator,
StackScreenProps,
Expand Down Expand Up @@ -50,10 +43,6 @@ import DragNDrop from './new_api/drag_n_drop';
import BetterHorizontalDrawer from './new_api/betterHorizontalDrawer';
import ManualGestures from './new_api/manualGestures/index';

LogBox.ignoreLogs([
"[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!",
]);

interface Example {
name: string;
component: React.ComponentType;
Expand Down
17 changes: 1 addition & 16 deletions src/handlers/createHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
findNodeHandle,
} from './gestureHandlerCommon';
import { ValueOf } from '../typeUtils';
import { isFabric, isJestEnv, tagMessage } from '../utils';
import { isFabric, isJestEnv } from '../utils';
import { ActionType } from '../ActionType';

const UIManagerAny = UIManager as any;
Expand Down Expand Up @@ -147,18 +147,6 @@ type InternalEventHandlers = {
onGestureHandlerStateChange?: (event: any) => void;
};

let showedRngh2Notice = false;
function showRngh2NoticeIfNeeded() {
if (!showedRngh2Notice) {
console.warn(
tagMessage(
"Seems like you're using an old API with gesture components, check out new Gestures system!"
)
);
showedRngh2Notice = true;
}
}

// TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.
export default function createHandler<
T extends BaseGestureHandlerProps<U>,
Expand Down Expand Up @@ -199,9 +187,6 @@ export default function createHandler<
}
handlerIDToTag[props.id] = this.handlerTag;
}
if (__DEV__ && !isJestEnv()) {
showRngh2NoticeIfNeeded();
}
}

componentDidMount() {
Expand Down