Skip to content

Conversation

@jgonet
Copy link
Member

@jgonet jgonet commented Jan 11, 2022

Description

We want to improve the discoverability of the new API. To do that we add console.warn when creating a gesture component such as <PanGestureHandler /> (console.info can't be suppressed). Unfortunately, we can't prevent false positives when components are used inside libraries. To disable this info, you can use this snippet:

import { LogBox } from 'react-native';

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

Test plan

  • Checked if warning doesn't appear in RNGH2 component (Example/src/new_api/reanimated/index.tsx) and appears in RNGH1 component (Example/src/basic/bouncing/index.tsx)
  • Checked if a warning doesn't appear with LogBox.ignoreLogs

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove changes to podfile/lock and send them in a separate PR ?

@jgonet jgonet force-pushed the jgonet/rngh-2-notice branch from 5dde772 to 7726ecb Compare January 11, 2022 11:01
@jgonet
Copy link
Member Author

jgonet commented Jan 11, 2022

Extracted lock updates to new PR: #1818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants