Skip to content

fix: New-Arch grid mount crash in the example and unrunnable expo example - #589

Merged
MatiPl01 merged 2 commits into
mainfrom
fix/example-newarch-crash-and-expo
Jul 7, 2026
Merged

fix: New-Arch grid mount crash in the example and unrunnable expo example#589
MatiPl01 merged 2 commits into
mainfrom
fix/example-newarch-crash-and-expo

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Two example-app issues surfaced while crash-testing every example across web, fabric, and expo on the New Architecture (RN 0.86 / reanimated 4.5.1).

Drag Handle grid-mount crash (New Arch, Debug only). The screen intermittently aborted on mount with a debug-only Yoga assertion (YGNodeGetOwner(...)) fired inside a reanimated commit. The root cause is upstream in RN 0.86, which mis-owns a Yoga node when two reanimated layout commits land in the same mount flush, and it needs a second layout committer to trigger. Here that committer was TabSelector, which measured each tab in onLayout and drove an animated width (a layout prop). It now keeps the measured width in React state (a plain layout prop) and animates only the indicator's translateX (a transform), so nothing races the grid's mount commit. Visual behaviour is unchanged, and Release builds were never affected (the assertion is a no-op there). The underlying RN bug is worth reporting upstream separately.

Expo example was unrunnable. example/expo has hoistingLimits: workspaces, so it declared none of the shared example-app's native dependencies and aborted at launch (AsyncStorage is null, then an unimplemented RNCSafeAreaProvider). It now declares the deps it needs, pins react-native-gesture-handler to an exact version to match the other examples, declares @react-navigation/elements (imported directly by the shared app but previously only resolved transitively), and ignores the expo prebuild generated ios/ and android/ directories.

Not covered here: example/paper (RN 0.81.4) does not compile under the Xcode 26 / iOS 26.5 SDK, which is a toolchain issue rather than an app fix.

@vercel

vercel Bot commented Jul 6, 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 6, 2026 2:59pm

@MatiPl01 MatiPl01 self-assigned this Jul 6, 2026
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file example fix labels Jul 6, 2026
MatiPl01 added 2 commits July 6, 2026 16:58
The Drag Handle example intermittently aborted on the New Architecture with a debug-only Yoga assertion fired inside a reanimated commit. RN 0.86 mis-owns a Yoga node when two reanimated layout commits land in the same mount flush, and TabSelector was the second committer: it measured each tab in onLayout and drove an animated width (a layout prop). Keep the measured width in React state (a plain layout prop) and animate only the indicator's translateX (a transform), so no reanimated layout commit races the grid mount. Visual behaviour is unchanged.
example/expo has hoistingLimits: workspaces, so it inherited none of the shared example-app native deps and aborted at launch (AsyncStorage null, then unimplemented RNCSafeAreaProvider). Add the deps it needs, pin gesture-handler to an exact version to match the other examples, declare @react-navigation/elements (imported directly by the shared app but previously only resolved transitively), and ignore the expo prebuild ios/ and android/ output.
@MatiPl01
MatiPl01 force-pushed the fix/example-newarch-crash-and-expo branch from 3974a64 to e2e08d6 Compare July 6, 2026 14:59
@MatiPl01
MatiPl01 merged commit 01aa1a8 into main Jul 7, 2026
11 checks passed
@MatiPl01
MatiPl01 deleted the fix/example-newarch-crash-and-expo branch July 7, 2026 09:35
MatiPl01 added a commit that referenced this pull request Jul 7, 2026
After #589, the `Build Expo App` CI job fails `npx expo-doctor` on the
duplicate-dependencies check.

The expo example set `installConfig.hoistingLimits: "workspaces"`, which
nested its declared dependencies under `example/expo/node_modules`
instead of hoisting them to the monorepo root, so react, react-native,
reanimated and worklets each existed twice. It also declared
`react-native-sortables`, which made expo-doctor walk into the library
and flag its gesture-handler v3 test devDep against the app's v2.

Dropping both lets every dependency hoist and dedupe against the shared
example-app copies. Expo keeps declaring its other native deps because,
unlike fabric/paper, it has no `react-native.config.js` +
`getDependencies` helper and autolinks from its own `package.json`. The
library stays resolvable because it is JS-only and metro still resolves
it as a workspace package.

Verified: expo-doctor's duplicate check passes, `expo prebuild` + pod
install resolve every native module from the monorepo root, and a full
`expo run:ios` builds, launches and renders the example.
MatiPl01 pushed a commit that referenced this pull request Jul 23, 2026
# [1.10.0](v1.9.4...v1.10.0) (2026-07-23)

### Bug Fixes

* Add item zIndex preserving based on the order of items ([#534](#534)) ([fb0be4e](fb0be4e)), closes [#36877](https://github.com/MatiPl01/react-native-sortables/issues/36877)
* allow scrolling the ScrollView from draggable items on web ([#574](#574)) ([74879ed](74879ed)), closes [#545](#545)
* Balance onTouchesUp on Sortable.Touchable long press ([#594](#594)) ([f977567](f977567))
* Deduplicate expo example native modules for expo-doctor ([#590](#590)) ([e5af169](e5af169)), closes [#589](#589)
* disable dragging for fixed-order and non-draggable handles ([#598](#598)) ([8ed2e81](8ed2e81))
* dragging stops after a screen is detached and re-attached (gesture-handler v3) ([#573](#573)) ([c70a14f](c70a14f)), closes [#349](#349) [react-native-gesture-handler#3560](https://github.com/react-native-gesture-handler/issues/3560) [#349](#349) [#349](#349)
* Item can settle on another item's slot after a rapid re-order ([#591](#591)) ([9d63817](9d63817)), closes [#586](#586)
* Item position drift on slow web container resize ([#562](#562)) ([8973115](8973115))
* Keep npm version from walking yarn workspaces during release ([#609](#609)) ([0d8d869](0d8d869))
* Keep Sortable.Grid measurements when revealed after react-freeze ([#572](#572)) ([609c73c](609c73c)), closes [#519](#519) [#36877](https://github.com/MatiPl01/react-native-sortables/issues/36877)
* keep Sortable.Touchable onTouchesUp firing on web ([#596](#596)) ([8529fa8](8529fa8)), closes [#594](#594)
* Keep Sortable.Touchable tap and long press working on teleported items ([#602](#602)) ([3efb111](3efb111))
* Keep teleported item in sync with collapsed content ([#595](#595)) ([1fbcf9e](1fbcf9e))
* New-Arch grid mount crash in the example and unrunnable expo example ([#589](#589)) ([01aa1a8](01aa1a8))
* Respect Sortable.Flex alignItems before items are measured ([#560](#560)) ([5c84117](5c84117)), closes [#258](#258)
* Restore tap and long press on teleported items ([#599](#599)) ([e73117b](e73117b))
* Sortable.Touchable crash on gesture-handler v3 (onActivate not a worklet) ([#587](#587)) ([4b3007e](4b3007e))
* Support react-native-gesture-handler 3.x types ([#553](#553)) ([83754e0](83754e0))
* Support react-native-reanimated 4.5 / worklets 0.10 ([#566](#566)) ([828c6d6](828c6d6)), closes [/github.com//issues/552#issuecomment-4634261543](https://github.com//github.com/MatiPl01/react-native-sortables/issues/552/issues/issuecomment-4634261543) [#552](#552)

### Features

* Add react-native-pulsar as a top-priority haptics adapter ([#568](#568)) ([642e734](642e734))
* Auto-detect expo-haptics when available ([#558](#558)) ([a0d7602](a0d7602)), closes [#554](#554)
* Reverse items stacking order  ([#535](#535)) ([14c7d82](14c7d82)), closes [#36877](https://github.com/MatiPl01/react-native-sortables/issues/36877)

### Performance Improvements

* Drive active item position from a single reaction ([#586](#586)) ([c498091](c498091)), closes [#584](#584)
@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

dependencies Pull requests that update a dependency file example fix released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant