Skip to content

feat(react-native): support Expo SDK 56 (React Native 0.85)#4584

Open
developerdanx wants to merge 1 commit into
mainfrom
chore/expo-sdk-56-upgrade
Open

feat(react-native): support Expo SDK 56 (React Native 0.85)#4584
developerdanx wants to merge 1 commit into
mainfrom
chore/expo-sdk-56-upgrade

Conversation

@developerdanx

@developerdanx developerdanx commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades @factorialco/f0-react-native from Expo SDK 54 to Expo SDK 56 (React Native 0.85, React 19.2.3, Hermes v1, New Architecture).

This is the design-system half of the SDK 56 upgrade; the Factorial mobile app will consume the published version next.

Version matrix

Before (SDK 54) After (SDK 56)
expo ~54.0.32 ~56.0.12
react-native 0.81.5 0.85.3
react / react-dom / react-test-renderer 19.1.0 19.2.3
reanimated / worklets 4.1.7 / 0.5.1 4.3.1 / 0.8.3
screens / safe-area / gesture-handler / svg 4.16 / 5.6 / 2.28 / 15.15.1 4.25.2 / 5.7.0 / 2.31.1 / 15.15.4
expo-blur / expo-clipboard / expo-image 15.0 / 8.0 / 3.0 ~56.x (SDK-aligned)
uniwind ^1.2.7 ^1.9.0

Notable changes

  • F0BlurView migrated to the SDK 55+ expo-blur API: experimentalBlurMethodblurMethod.
  • babel.config.cjs is now a function that adds react-native-worklets/plugin only for app bundles (Metro caller). The builder-bob library build keeps it off, so consumers workletize at bundle time (unchanged published behaviour); the bundled playground app now workletizes its own Reanimated worklets.
  • Jest: preset switched to @react-native/jest-preset (the RN 0.85 react-native/jest-preset shim throws), react-native-worklets mocked, @types/react-test-renderer added, and the react-test-renderer 19.2 type tightening handled in F0Button / F0Step / PressableFeedback specs.
  • Peer deps realigned: expo-image / expo-blur loosened, expo-clipboard moved from dependencies to peerDependencies. Root pnpm React-island override → 19.2.3.
  • Snapshots updated for the React 19.2 useId() id format change («rN»_rN_) in svg gradient/clipPath ids.

Why uniwind 1.9 / react 19.2.3 (not the latest patch)

Both surfaced during on-device testing and were then verified against upstream sources.

uniwind → ^1.9.0

The playground failed to bundle on uniwind@1.2.7. Two reasons:

  1. It predates SDK 56. uniwind 1.2.x is catalogued/tested against Expo 54 / RN 0.81 / Metro 0.83; explicit Expo 56 / RN 0.85.3 / Metro 0.84.4 support (catalog, lockfile, metro peer deps) only lands in v1.8.0+.
  2. Its older custom Metro resolver has a monorepo bug. In a pnpm workspace, uniwind's nativeResolver (uniwind/dist/metro/index.cjs) computed its package root via Metro's context-dependent resolver, yielding a path that escapes the file-map root, so metro-file-map throws Invariant Violation: Unexpectedly escaped traversal (TreeFS). This is a uniwind resolver issue in pnpm/Bun monorepos — not a Metro-0.84-specific incompatibility (that invariant is unchanged across metro-file-map 0.80–0.84). Upstream: uni-stack/uniwind#505, fixed in v1.6.3 (#506 — switched to require.resolve).

We move to ^1.9.0: the current release, pinned against Expo 56 / RN 0.85.3 / Metro 0.84.4, carrying both the v1.6.3 resolver fix and a v1.9.0 multiple-instances fix (#570). (v1.6.3 is the minimum with the fix; v1.8.0 the minimum with SDK 56 support.)

react → exactly 19.2.3

RN 0.85.3 embeds react-native-renderer 19.2.3 and asserts at startup that React.version is byte-for-byte equal: if ("19.2.3" !== React.version) throw "Incompatible React versions…". RN's peer range is the loose ^19.2.3, so a package manager installs the latest 19.2.x (we got 19.2.7) which then fails that strict runtime check. Pinning react / react-dom / react-test-renderer to exactly 19.2.3 — the version Expo SDK 56's bundledNativeModules.json pins — is the fix. Upstream: facebook/react-native#57079. (The react.dev/warnings/version-mismatch URL in the error is a generic "learn more" link; the exact-match rule itself lives in RN's bundled renderer, not that page.)

Verification

  • pnpm lint ✅ · pnpm tsc ✅ · pnpm test ✅ (489 tests) · pnpm build (builder-bob) ✅
  • Ran the playground on an iPhone 17 Pro (Expo Go, SDK 56.0.0): Design Tokens tab plus the Activity, AnimatedF0Text (Reanimated entering animations), F0BlurView (blur), F0Avatar (svg + useId), and F0Progress (svg + animated circle) showcases all render with no errors.

Notes

  • New Architecture and Hermes v1 are defaults in SDK 56; no app-config flags needed.
  • The ViewConfigIgnore babel/jest workaround was re-validated against RN 0.85 (same path + exports) — no change required.

@github-actions github-actions Bot added feat react-native Changes affect packages/react-native labels Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-4584-react-native to install the package

Use pnpm i github:factorialco/f0#b2f0c0b67a60018776200a7e9e0393af78d0f2f2 to install this specific commit

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

📱 Expo Go Preview Published

  • Branch: development
  • Message: `feat(react-native): support Expo SDK 56 (React Native 0.85)

Upgrade @factorialco/f0-react-native to Expo SDK 56 / React Native 0.85 / React 19.2.

Links

QR Code

Expo Go Preview QR

Upgrade @factorialco/f0-react-native to Expo SDK 56 / React Native 0.85 / React 19.2.

- Bump expo ~56.0.12, react-native 0.85.3, and react/react-dom/react-test-renderer
  to exactly 19.2.3 (RN 0.85.3's bundled react-native-renderer requires the exact
  React version; the loose ^19.2.3 peer otherwise resolves a newer 19.2.x that
  fails RN's runtime check — react/react-native#57079). All expo-* + native
  libs aligned to the SDK 56 bundled versions (reanimated 4.3.1, worklets 0.8.3,
  screens 4.25.2, safe-area-context 5.7.0, gesture-handler 2.31.1, svg 15.15.4, etc.)
- uniwind ^1.9.0 — 1.2.7 predates SDK 56 and its older custom Metro resolver throws
  "Unexpectedly escaped traversal" in pnpm monorepos (uni-stack/uniwind#505, fixed
  in v1.6.3); 1.9.0 is the current release pinned to Expo 56 / RN 0.85.3 / Metro 0.84.4
- Migrate F0BlurView to the SDK 55+ expo-blur API (experimentalBlurMethod -> blurMethod)
- babel.config: add react-native-worklets/plugin only for app bundles (Metro),
  keep it off for the builder-bob library build so consumers workletize
- jest: switch preset to @react-native/jest-preset (RN 0.85), mock
  react-native-worklets, add @types/react-test-renderer; adapt specs to the
  stricter react-test-renderer 19.2 types
- Realign expo-* peer deps (expo-image/blur loosened; expo-clipboard moved to
  peerDependencies); root pnpm React-island override -> 19.2.3
- Update snapshots for the React 19.2 useId() id format

Verified on iPhone 17 Pro (Expo Go, SDK 56.0.0): Design Tokens plus component
showcases (Activity, AnimatedF0Text, F0BlurView, F0Avatar, F0Progress) render
cleanly. Gate green: lint, tsc, test (489), build.

BREAKING CHANGE: targets Expo SDK 56 / React Native 0.85 / React 19.2 — consumers
must upgrade their app. F0BlurView's experimentalBlurMethod prop is renamed to
blurMethod, and the uniwind peer dependency is raised to ^1.9.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat react-native Changes affect packages/react-native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant