Skip to content

chore: support only expo sdk 54+ new arch#3697

Merged
developerdanx merged 8 commits intomainfrom
feat/expo-sdk-54-export-for-new-architecture
Apr 10, 2026
Merged

chore: support only expo sdk 54+ new arch#3697
developerdanx merged 8 commits intomainfrom
feat/expo-sdk-54-export-for-new-architecture

Conversation

@developerdanx
Copy link
Copy Markdown
Contributor

@developerdanx developerdanx commented Mar 19, 2026

Description

  • support only expo sdk 54+ new arch

Problem

  • The library's build step pre-compiled worklets into lib/module/, stamping them with a specific react-native-worklets plugin version. Host apps running a different worklets version hit a runtime version mismatch error. The library also needed to work in both Expo Go (worklets 0.5.1) and the host app (worklets 0.8.x).

Solution

Same strategy as react-native-gesture-handler: ship plain JS in lib/module/ — no pre-compiled worklets. Each consumer's Metro/Babel pipeline handles workletization at bundle time, using its own worklets version.
Changes:

  • babel.config.cjs — Disabled worklet Babel plugin during library build ({ reanimated: false })
  • package.json — Downgraded devDeps to match Expo Go SDK 54 (reanimated ~4.1.7, worklets 0.5.1); widened peerDeps to accept reanimated 4.1–4.x and worklets 0.5–0.x
  • jest.setup.js — Removed unnecessary worklets mock (0.5.1 has built-in Jest detection)
  • lib/module/ — Rebuilt clean, zero worklet stamps
    No runtime performance impact — animations still run on the UI thread. The only difference is when the worklet compilation happens (consumer build time instead of library build time). All 434 tests pass

Copilot AI review requested due to automatic review settings March 19, 2026 09:13
@github-actions github-actions bot added chore react-native Changes affect packages/react-native labels Mar 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

📦 Alpha Package Version Published

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

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

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 narrows @factorialco/f0-react-native support to Expo SDK 54+ and React Native New Architecture, updating dependencies and documentation accordingly.

Changes:

  • Update React Native peer dependency stack to Reanimated 4 + react-native-worklets and remove react-native-worklets-core.
  • Remove unused/development-only packages from packages/react-native and the lockfile.
  • Add/refresh docs describing New Architecture + Expo 54 host app requirements.

Reviewed changes

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

Show a summary per file
File Description
pnpm-lock.yaml Reflects dependency removals and the updated Reanimated/Worklets stack.
packages/react-native/package.json Updates peer/dev deps for Expo SDK 54+ and Reanimated 4; removes old/unused deps.
packages/react-native/docs/new-architecture.md New documentation about New Architecture and Expo 54 compatibility/requirements.
packages/react-native/babel.config.cjs Adds an explicit plugins: [] entry alongside existing presets.
packages/react-native/README.md Documents the Expo 54+ / New Arch-only support and updates installation/config guidance.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread packages/react-native/docs/new-architecture.md Outdated
Comment thread packages/react-native/README.md Outdated
Comment thread packages/react-native/README.md
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

📱 Expo Go Preview Published

  • Branch: development
  • Message: chore: update peer dependency versions in README.md for react-native and add new expo dependencies
  • Group ID: a580289d-8421-4b89-9796-cee1302920a5
  • Created at: 2026-04-10T10:03:03.271Z

Links

QR Code

Expo Go Preview QR

Copilot AI review requested due to automatic review settings March 31, 2026 11:47
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

Updates @factorialco/f0-react-native to explicitly target Expo SDK 54+ with React Native New Architecture (Fabric/TurboModules), aligning dependency expectations and host-app setup docs accordingly.

Changes:

  • Update React Native package peer dependencies for the Expo SDK 54 / RN 0.81 stack (notably Reanimated 4 + react-native-worklets) and remove no-longer-used deps.
  • Expand/update React Native package documentation to state “New Architecture + Expo SDK 54+ only” and adjust setup steps.
  • Add a dedicated New Architecture compatibility/troubleshooting document.

Reviewed changes

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

Show a summary per file
File Description
pnpm-lock.yaml Lockfile updates reflecting dependency removals/bumps aligned with the new supported stack.
packages/react-native/README.md Documents New Architecture + Expo SDK 54+ support and updates installation/configuration guidance.
packages/react-native/package.json Updates peer deps to Reanimated 4 + react-native-worklets, removes unused deps.
packages/react-native/docs/new-architecture.md New doc describing compatibility expectations and host requirements/troubleshooting.
packages/react-native/babel.config.cjs Adds explicit empty plugins array in Babel config.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +34 to 49
# 2) Install Expo-native dependencies pinned to your SDK
npx expo install \
expo-image \
react-native-reanimated \
react-native-worklets \
react-native-safe-area-context \
react-native-svg
```

> **Note:** The following peer dependencies are required:
>
> - `uniwind` and `tailwindcss` - Required for styling (must be configured in Metro and CSS files)
> - `tailwind-merge` and `tailwind-variants` - Required for component variant system and class merging
> - `react-native-reanimated` - Required for animations
> - `react-native-worklets` - Required by Reanimated 4
> - `react-native-safe-area-context` - Required for safe area handling
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The Quick Setup install instructions omit expo-blur, but expo-blur is listed as a required peer dependency in packages/react-native/package.json and is imported by F0BlurView. This can lead to runtime/module resolution errors for consumers following the README. Please add expo-blur to the npx expo install list (and ideally to the “required peer dependencies” bullet list).

Copilot uses AI. Check for mistakes.
| `react-native-reanimated` | `^4.1.0` | ✅ Yes | Animations |
| `react-native-worklets` | `>=0.5.0 <1.0.0` | ✅ Yes | Worklet runtime for Reanimated 4 |
| `react-native-safe-area-context` | `^5.6.0` | ✅ Yes | Safe area handling |
| `react-native-svg` | `^15.12.1` | ✅ Yes | SVG support for icons |
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The “Peer Dependencies” table is missing expo-image and expo-blur, even though both are required peer dependencies in packages/react-native/package.json and are directly imported in primitives (F0Image, F0BlurView). The table should list them to prevent incomplete host setup.

Suggested change
| `react-native-svg` | `^15.12.1` | ✅ Yes | SVG support for icons |
| `react-native-svg` | `^15.12.1` | ✅ Yes | SVG support for icons |
| `expo-image` | `*` | ✅ Yes | Image component for primitives |
| `expo-blur` | `*` | ✅ Yes | Blur view for primitives |

Copilot uses AI. Check for mistakes.
@developerdanx developerdanx marked this pull request as ready for review April 10, 2026 07:55
@developerdanx developerdanx requested a review from a team as a code owner April 10, 2026 07:55
Copilot AI review requested due to automatic review settings April 10, 2026 07:55
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

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

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +13 to +18
| Host stack | Support |
| ------------------------------------------------ | ---------------- |
| Expo SDK 54+ | ✅ Supported |
| Expo SDK 53 and below | ❌ Not supported |
| New Architecture enabled (`expo.newArchEnabled`) | ✅ Required |
| Old Architecture | ❌ Not supported |
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

expo.newArchEnabled isn't the Expo config key used to enable the New Architecture. In Expo config it’s newArchEnabled (as shown in this repo’s packages/react-native/app.json). Update the README to reference newArchEnabled so users don’t set a non-existent/ignored config field.

Suggested change
| Host stack | Support |
| ------------------------------------------------ | ---------------- |
| Expo SDK 54+ | ✅ Supported |
| Expo SDK 53 and below | ❌ Not supported |
| New Architecture enabled (`expo.newArchEnabled`) | ✅ Required |
| Old Architecture | ❌ Not supported |
| Host stack | Support |
| ------------------------------------------- | ---------------- |
| Expo SDK 54+ | ✅ Supported |
| Expo SDK 53 and below | ❌ Not supported |
| New Architecture enabled (`newArchEnabled`) | ✅ Required |
| Old Architecture | ❌ Not supported |

Copilot uses AI. Check for mistakes.

Expo SDK 54 uses React Native 0.81 and **new architecture is the default direction**.

- To enable new architecture in an Expo app, set `expo.newArchEnabled` in your `app.json` / `app.config.js`.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The docs instruct setting expo.newArchEnabled, but Expo config uses newArchEnabled (see packages/react-native/app.json in this repo). Please update this to avoid directing consumers to a non-existent/ignored config option.

Suggested change
- To enable new architecture in an Expo app, set `expo.newArchEnabled` in your `app.json` / `app.config.js`.
- To enable new architecture in an Expo app, set `newArchEnabled` in your `app.json` / `app.config.js`.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 10, 2026 09:36
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

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

Comment on lines +34 to +40
# 2) Install Expo-native dependencies pinned to your SDK
npx expo install \
expo-image \
react-native-reanimated \
react-native-worklets \
react-native-safe-area-context \
react-native-svg
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The install snippet for Expo-native deps is missing expo-blur, but expo-blur is a required peer dependency (used by F0BlurView). This can lead to runtime/metro resolution errors in host apps following the README. Add expo-blur to the npx expo install list (and keep it pinned to the host SDK).

Copilot uses AI. Check for mistakes.
Comment on lines 43 to 52
> **Note:** The following peer dependencies are required:
>
> - `uniwind` and `tailwindcss` - Required for styling (must be configured in Metro and CSS files)
> - `tailwind-merge` and `tailwind-variants` - Required for component variant system and class merging
> - `react-native-reanimated` - Required for animations
> - `react-native-worklets` - Required by Reanimated 4
> - `react-native-safe-area-context` - Required for safe area handling
> - `react-native-svg` - Required for icon components
> - `date-fns` - Required for date utilities
> - `twemoji-parser` - Required for emoji support
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This peer dependency list omits expo-image and expo-blur, but both are required peers and are imported by primitives (F0Image / F0BlurView). Please include them here so consumers don’t miss installing them.

Copilot uses AI. Check for mistakes.
Comment on lines 112 to 116
"dependencies": {
"expo-clipboard": "~8.0.8",
"lodash": "^4.17.21",
"tailwind-merge": "^3.4.0",
"tailwind-variants": "^3.2.2"
},
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

lodash was removed from dependencies, but @types/lodash is still listed in devDependencies. If lodash is no longer used in this package, drop @types/lodash as well to avoid stale/unused deps.

Copilot uses AI. Check for mistakes.
@developerdanx developerdanx merged commit 6025150 into main Apr 10, 2026
20 checks passed
@developerdanx developerdanx deleted the feat/expo-sdk-54-export-for-new-architecture branch April 10, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore react-native Changes affect packages/react-native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants