Skip to content

chore: Run the fabric example on gesture-handler v3 - #582

Merged
MatiPl01 merged 2 commits into
mainfrom
chore/gesture-handler-v3-fabric-example
Jul 4, 2026
Merged

chore: Run the fabric example on gesture-handler v3#582
MatiPl01 merged 2 commits into
mainfrom
chore/gesture-handler-v3-fabric-example

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Stacked on #573.

The fabric example targets the New Architecture, so this points it at gesture-handler v3 (which drops Old Architecture support) while the paper example stays on v2. It gives the repo a working v3 example on the New Architecture.

Because the two examples now use different gesture-handler majors, two resolution fixes are needed, both scoped to the fabric example:

  • react-native.config.js resolves gesture-handler from the fabric app's own dependency (hoisted to the monorepo root). The shared getDependencies resolver points a differing-version dep at a local node_modules path that does not exist once v3 is hoisted, which silently drops the native module from autolinking.
  • metro.config.js blocks the v2 copy nested under the shared example app so the JS bundle resolves the same v3 the native build links against.

Verified on an Android emulator (New Architecture): the full example app builds, runs, and reorders via drag-and-drop on gesture-handler v3, and the paper example's v2 resolution is unchanged.

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
react-native-sortables-docs Ignored Ignored Preview Jul 4, 2026 11:03am

@MatiPl01 MatiPl01 self-assigned this Jul 4, 2026
@github-actions github-actions Bot added chore dependencies Pull requests that update a dependency file example labels Jul 4, 2026
@MatiPl01
MatiPl01 force-pushed the chore/gesture-handler-v3-fabric-example branch from 04f3e3e to e64cd37 Compare July 4, 2026 08:24
Base automatically changed from fix/gesture-handler-v3-stuck-drag to main July 4, 2026 09:43
The fabric example targets the New Architecture, so run it on
gesture-handler v3 (which drops Old Architecture support) while the paper
example stays on v2. Two shared-script changes let the examples use
different majors of a dependency:

- getDependencies resolves each dependency with require.resolve instead
  of a hardcoded node_modules path, so it is hoist-proof: an app pinning
  a divergent major autolinks that version wherever yarn placed it.
- createMetroConfig gains a filterFromCommonApp option that blocks the
  shared example app's copy of a module, so a host bundling on a
  different major resolves its own version, matching the native build.

The fabric example then only declares gesture-handler v3 and passes it
to filterFromCommonApp.
@MatiPl01
MatiPl01 force-pushed the chore/gesture-handler-v3-fabric-example branch from e64cd37 to bee9e1f Compare July 4, 2026 10:35
@MatiPl01
MatiPl01 merged commit 3bf7064 into main Jul 4, 2026
11 checks passed
@MatiPl01
MatiPl01 deleted the chore/gesture-handler-v3-fabric-example branch July 4, 2026 11:04
@MatiPl01

Copy link
Copy Markdown
Owner Author

馃帀 This PR is included in version 1.10.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

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

Labels

chore dependencies Pull requests that update a dependency file example released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant