Show HN: One – A new React framework unifying web, native and local-first (opens in a new tab)onestack.dev
506 pointsOne is a React framework that does two things differently in hopes of simplifying how we build websites and apps:
1. It unifies React Native and React web with typed file system routing by making Vite able to serve RN. This lets you share (or diverge) your code in a simpler way for cross-platform apps.
2. We've partnered with Zero (https://zerosync.dev) to make local-first work well. We've been building a solution in One that makes Zero supporting server rendering, without waterfalls, and with seamless server/client handoff.
---
Honestly - I'm a bit hesitant to post One here.
HN has really soured on frontend/frameworks. And I get it. We've collectively complicated the hell out of things.
That's why I decided to build One. I loved Rails, it made me as a young developer able to finally realize way more ambitious projects than I'd ever done before. I also liked the promise (not implementation) of Meteor - it felt like the clear future, I guess just a bit too early (and a bit too scope-creeped).
I worked at Uniswap and built Tamagui and so spent a lot of time building cross-platform apps that share code. Uniswap is built on Tamagui and I think proves you can make really high quality UX while sharing a lot of code - but it's insanely hard and requires a huge team. My goal with One is to make what is now possible but hard dramatically easier.
And I think the path to there goes through local-first, because it makes building super responsive apps much, much simpler, and Zero is the first library to actually pull it off in a way that doesn't bloat your bundle or have very limiting constraints.
I happened to live down the street from Aaron, one of the founders of Zero, in our tiny town in Hawaii. We talked a lot about Zero over the last couple years, and I found it really admirable how he consistently chose the "harder but better" path in building it. It really shaped into something incredible, and that convinced me to actually launch One, which at the time was more of an experiment.
I can see a lot of potential criticism - do we need yet another framework, this is too shiny and vaporware-y, this is just more complexity and abstraction, etc. Happy to respond to those comments if they come.
I'm just building out something that I've been wanting for a long time. Opinionated enough to let me move fast like Rails, but leaning on the great work of team Zero so that we don't end up with the scope creep of Meteor. And honestly, it's just really fun to hack on.

Comments (254) 60 threads
Earlier commentsBut it will always be opt-in to Zero.
I think it’s an amazing alternative to CRA - it’s got the lightness of Vite, but you get all three rendering modes on a per page basis!
First, is this a whole new router? Is it based on expo-router, or is it sitting on top of react-navigation? Maybe all new with react-native-screens as a foundation?
As far as Vite goes, I assume this is only on the web? Metro is still be used on the native side? If true any reason why you’re not using metro on the web as well (I’m kinda partial to having all platforms as similar as possible, tooling wise)?
I suppose I should also ask how expo fits into this all…meta framework on top of expo or something “all new” on stock react native?
It’s actually fully Vite on native. We wrote an entire custom bundling step and hot reloading. This was no small feat, quite hard. That was the motivation though - simple tooling and the same bundler for everything.
Expo is great for Expo Go and EAS. It’s a good complement!
Then we actually build out our own custom bundle using the Rollup output because we need to hot reload it, so we built our own little hot reload pipeline on top of Vite. It's not too complex actually - websocket, listen to vite, transpile it to CJS/ES5, analyze and re-write imports to match bundle, and then send it over.
But yea, it was a lot of work. Going to have to make some content around this as I assume a lot of people thing it's just Vite on top of Metro.
I’m also not really sure what problem this is solving. We already have the ability to create android and iOS apps based on one source code to react native. So what’s the additional benefit here?
One generally has better web features/performance. Our tree shaking/bundle splitting is better, SWC for everything so it's faster, and Vite is a joy to use in many ways compared to Metro.
The routing modes are also neat and novel, you can globally choose a strategy - SSR, SPA, SSG, but then also choose on a per-page basis. This is huge for having performant marketing pages, but not burden yourself with having to server render everything.
Our dev mode is also robust - it will fully SSR render with CSS extracted in dev mode, identical to production. This is pretty huge, even Next doesn't do this (as of a few months ago), you'd have flickers or inconsistencies.
Other advantages include link-hover-preloading, a much slimmer initial bundle size, 0 waterfalls of all assets loaded on first render. Loaders are another, no universal framework does it. Also, we build to production fully for you including a server to serve it, and it works with all your stuff - loaders, API routes, etc - also not true of comparables.
Love this the most:
> almost all features can be built completely client-side, with no need for new server-side APIs
Any thoughts on a desktop target for this (e.g Electron/or Webview Desktop target)?
All comments shown.
Couldn't load more comments. Check your connection and try again.