chore: support only expo sdk 54+ new arch#3697
Conversation
📦 Alpha Package Version PublishedUse Use |
There was a problem hiding this comment.
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-workletsand removereact-native-worklets-core. - Remove unused/development-only packages from
packages/react-nativeand 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
📱 Expo Go Preview Published
LinksQR Code |
There was a problem hiding this comment.
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
| # 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 |
There was a problem hiding this comment.
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).
| | `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 | |
There was a problem hiding this comment.
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.
| | `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 | |
| | Host stack | Support | | ||
| | ------------------------------------------------ | ---------------- | | ||
| | Expo SDK 54+ | ✅ Supported | | ||
| | Expo SDK 53 and below | ❌ Not supported | | ||
| | New Architecture enabled (`expo.newArchEnabled`) | ✅ Required | | ||
| | Old Architecture | ❌ Not supported | |
There was a problem hiding this comment.
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.
| | 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 | |
|
|
||
| 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`. |
There was a problem hiding this comment.
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.
| - 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`. |
…for compatibility
…or library build compatibility
| # 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 |
There was a problem hiding this comment.
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).
| > **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 |
There was a problem hiding this comment.
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.
| "dependencies": { | ||
| "expo-clipboard": "~8.0.8", | ||
| "lodash": "^4.17.21", | ||
| "tailwind-merge": "^3.4.0", | ||
| "tailwind-variants": "^3.2.2" | ||
| }, |
There was a problem hiding this comment.
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.
…and add new expo dependencies
Description
Problem
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:
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