One is an innovative React framework designed to unify web and native application development from a single codebase, leveraging Vite as its core bundler for both environments. Currently at version 1.15.10, it integrates with React 19.2.0 and React Native 0.83.2. This framework aims to simplify full-stack development by providing features like typed file-system routing, per-page render modes (SPA, SSR, SSG), and loaders, abstracting away complex platform-specific configurations and build processes. Its key differentiator is a focus on a cohesive, performant developer experience for hybrid apps, aiming to replace traditional setups involving Metro for native and separate web frameworks. One originated from the experience of building cross-platform apps with Tamagui Takeout and at Uniswap, highlighting its practical, production-oriented approach.
npm install oneVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic 'One' application structure, including a root layout and a simple page component, configured for both web and native environments. It highlights the use of `App`, `View`, and `Text` components within the 'One' framework.
Review the official React 19 upgrade guide and One's migration documentation. For `PropTypes`, migrate to TypeScript. For `forwardRef`, adapt to the new ref-as-prop pattern. Address `useEffect` double-invocations by ensuring proper cleanup functions.
Ensure `sharp` is installed in an environment matching the target deployment (e.g., Docker container for AWS Lambda). Use `--platform` and `--arch` flags during `npm install sharp` if cross-compiling. For strict package managers like pnpm, explicitly add `sharp` as a direct dependency (`pnpm add sharp`).
Always check the `peerDependencies` in `one`'s `package.json` for exact version ranges. Use a lockfile (`yarn.lock` or `package-lock.json`) and resolve peer dependency conflicts promptly. Running `npx expo doctor` or similar tools for bare React Native projects can help diagnose issues.
Monitor 'one' GitHub releases and Discord channels for announcements. Pin minor versions (`~1.x.x`) rather than major versions (`^1.x.x`) if stability is paramount, or prepare for more frequent updates.
For iOS, run `cd ios && pod install`. For Android, rebuild the project: `cd android && ./gradlew clean` then `npx react-native run-android`. Sometimes clearing Metro cache (`npx react-native start --reset-cache`) and reinstalling `node_modules` helps.
Ensure `sharp` is installed in the target environment (e.g., inside a Docker container matching your Lambda runtime for serverless deployments). On local development, try `npm rebuild sharp` or `npm install sharp --verbose`. Delete `node_modules` and `package-lock.json` (or `yarn.lock`), then reinstall.
Verify that `react-native-screens` and `@react-navigation/native` (and other `@react-navigation` packages) are compatible versions. Ensure you are importing `enableScreens()` or similar setup functions if required by your specific `react-native-screens` version, typically at the app's entry point.