Skip to content

[General] Remove createNativeWrapper from Touchable#4138

Merged
j-piasecki merged 2 commits intomainfrom
@jpiasecki/touchable-no-native-wrapper
May 4, 2026
Merged

[General] Remove createNativeWrapper from Touchable#4138
j-piasecki merged 2 commits intomainfrom
@jpiasecki/touchable-no-native-wrapper

Conversation

@j-piasecki
Copy link
Copy Markdown
Member

Description

Replaces button wrapped with createNativeWrapper with a direct call to useNativeGesture and NativeDetector.

Test plan

According to the Touchable stress test, the version using GestureDetector and useNativeGesture directly is about 10% faster to render.

Copilot AI review requested due to automatic review settings April 30, 2026 09:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the API v3 Touchable component to avoid createNativeWrapper, wiring the native gesture directly via useNativeGesture and NativeDetector to improve render performance.

Changes:

  • Removed createNativeWrapper usage from Touchable.
  • Added a direct useNativeGesture configuration and wrapped GestureHandlerButton with NativeDetector.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@j-piasecki j-piasecki merged commit af6d049 into main May 4, 2026
3 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/touchable-no-native-wrapper branch May 4, 2026 10:40
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