Skip to content

[Suggestion] [v3] Do not emit warning for undefined hook properties #4021

@unendingblue

Description

@unendingblue

Description

In the current v3 implementation, setting a hook property as undefined emits the following error:

WARN  [react-native-gesture-handler] <property> is not a valid property for <handler> and will be ignored.

It should instead silently ignore those properties.

Steps to reproduce

const panGesture = usePanGesture({
  [standard configuration here],
  activeOffsetY: Platform.OS === 'android' ? [-75, 75] : undefined,
});

A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.

Gesture Handler version

3.0.0-beta.1

React Native version

0.83.2

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions