Skip to content

Revert "Export new createNativeWrapper (#3971)"#4001

Merged
m-bert merged 6 commits intomainfrom
@mbert/do-not-export-createNativeWrapper
Mar 2, 2026
Merged

Revert "Export new createNativeWrapper (#3971)"#4001
m-bert merged 6 commits intomainfrom
@mbert/do-not-export-createNativeWrapper

Conversation

@m-bert
Copy link
Copy Markdown
Collaborator

@m-bert m-bert commented Feb 26, 2026

This reverts commit bdf353d.

Description

We decided that it will be better not to export new createNativeWrapper as it might be confusing when to use it.

Test plan

Try to import createNativeWrapper
Read docs 🤓

Copilot AI review requested due to automatic review settings February 26, 2026 14:27
export { RotationGestureHandler } from './handlers/RotationGestureHandler';
export { FlingGestureHandler } from './handlers/FlingGestureHandler';
export { default as legacy_createNativeWrapper } from './handlers/createNativeWrapper';
export { default as createNativeWrapper } from './handlers/createNativeWrapper';
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Even though we're still in beta, I can see the reason why we would want to keep legacy prefix here. WDYT @j-piasecki @akwasniewski?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine by me, we should mention that in the migration guide and llm skill

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

aa95b97, let me know what you think.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you see any reason agains deprecating it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, deprecated in ca857a7.

Though this is how it looks like in vsc:

image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've also added it to docs: 2c6a3c9

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 reverts the export of a new createNativeWrapper function from the v3 API (commit bdf353d). The decision was made to avoid confusion about when to use the new wrapper versus the legacy one. The revert restores the original naming convention where createNativeWrapper refers to the legacy implementation.

Changes:

  • Removed export of new createNativeWrapper from v3 index
  • Reverted legacy_createNativeWrapper back to createNativeWrapper in main index
  • Removed documentation page for the new createNativeWrapper
  • Removed migration guide sections about the new wrapper
  • Cleaned up empty lines in migration documentation for consistency

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/react-native-gesture-handler/src/v3/index.ts Removed export of new createNativeWrapper from v3 API
packages/react-native-gesture-handler/src/index.ts Reverted legacy_createNativeWrapper back to createNativeWrapper
packages/docs-gesture-handler/docs/components/create-native-wrapper.mdx Completely removed documentation page for new wrapper
packages/docs-gesture-handler/docs/guides/upgrading-to-3.mdx Removed migration section about new wrapper and adjusted import statement placement
skills/gesture-handler-3-migration/SKILL.md Removed guidance about new wrapper and cleaned up formatting

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

@m-bert m-bert merged commit 19b619b into main Mar 2, 2026
6 checks passed
@m-bert m-bert deleted the @mbert/do-not-export-createNativeWrapper branch March 2, 2026 11:48
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