Conversation
There was a problem hiding this comment.
Pull request overview
Exports the RNGH3 (v3) createNativeWrapper as the public createNativeWrapper API while preserving the previous implementation under legacy_createNativeWrapper, and updates migration guidance/docs accordingly.
Changes:
- Re-export v3
createNativeWrapperand rename the legacy export tolegacy_createNativeWrapper. - Add/extend upgrade + migration-skill documentation for the new wrapper, including the new
detectorTypeparameter. - Add a dedicated docs page for
createNativeWrapper.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/gesture-handler-3-migration/SKILL.md | Updates LLM migration instructions to mention the rewritten createNativeWrapper and legacy fallback. |
| packages/react-native-gesture-handler/src/v3/index.ts | Exports the new v3 createNativeWrapper. |
| packages/react-native-gesture-handler/src/index.ts | Renames the legacy export to legacy_createNativeWrapper while continuing to export v3 APIs. |
| packages/docs-gesture-handler/docs/guides/upgrading-to-3.mdx | Adds an upgrade-guide section describing the new createNativeWrapper. |
| packages/docs-gesture-handler/docs/components/create-native-wrapper.mdx | Adds a new API docs page for createNativeWrapper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/docs-gesture-handler/docs/components/create-native-wrapper.mdx
Outdated
Show resolved
Hide resolved
| ### detectorType | ||
|
|
||
| ```ts | ||
| enum GestureDetectorType { | ||
| Native, | ||
| Virtual, | ||
| Intercepting, | ||
| } | ||
| ``` | ||
|
|
||
| Type of the gesture detector that will be used to recognize the `Native` gesture. For more details on available options, see the [Gesture Detectors](/docs/fundamentals/gesture-detectors) documentation. Defaults to `GestureDetectorType.Native` (which is just [`GestureDetector`](/docs/fundamentals/gesture-detectors#gesture-detector)). | ||
|
|
There was a problem hiding this comment.
The docs suggest you can switch to GestureDetectorType.Virtual by just passing detectorType, but the underlying VirtualGestureDetector requires being rendered under an InterceptingGestureDetector (it throws otherwise). Consider adding an explicit note/example showing the required InterceptingGestureDetector wrapper when using GestureDetectorType.Virtual.
There was a problem hiding this comment.
This is described in the gesture detectors section, so I'm not sure if it is required here. If someone doesn't know how it works, they will probably have to look into these docs anyway (cc @akwasniewski)
Description
This PR exports new
createNativeWrapperimplementation and renames old one tolegacy_createNativeWrapper. It also updated documentation, along with skill for LLM migration.Test plan
Check example from new docs.