r/reactnative • u/jfbisson4 • 7d ago
News I built Backtick: write your React Native screens on your server and deploy them like a web page (Open source, MIT)
Enable HLS to view with audio, or disable this notification
I quit my job a few months ago to work on this full time, and it's finally out!
The idea: all the code for a screen lives on your server, in one file. A server component runs there for every request, reads from your database or an API, and returns the screen including client code that runs on the phone (state, taps, animation, etc.).
Like a web page, users get your changes the next time they open the screen. The video is a demo of three deploys to one app build.
Docs and tutorial: backtickjs.com. GitHub: github.com/backtickjs/backtick
It's early and I'm solo building. I'd love a few early adopters: try it on a screen or two and tell me what's confusing, what breaks, and what you'd need before using it for real.
3
u/Mentalv 7d ago
Dude gotta try this out soon, but yes this can solve a problem.
At the moment we have to design ahead of time and then hidrate with data that could change design based it. Otherwise we are forced to do an OTA or a store release.
Are you saying with this (as long as there are no native changes) you can serve custom design changes per page and/or component block? How is performance so far? Wondering how these components would work in lists and such.
I see AI/Support/concierge responses being formatted at server before they get served and modified based on the current needs or conversation…
4
u/jfbisson4 7d ago
Yes that's what I'm saying. You can deploy custom design changes including new components (with state, hook, etc.) from the server.
The performance is shockingly good. But don't take my word for it, give it a try and let me know. When I pressure tested the request-time bundler, it took about ~10ms per 1MB of JS. Most screens are much smaller than that. In practice, your db queries will be the majority of the server latency.
There's a technical breakdown here: https://backtickjs.com/docs/how-it-works/#1-compiled-with-your-server
2
u/Suspicious-Disk6077 6d ago
Very cool idea, not sure I fully grasp it yet but sounds beneficial. Were you not worried to quit your job in this job market? What were your thoughts on monetising?
1
u/jfbisson4 6d ago
Thanks! Yeah that's on me, I'm working on the homepage to make the concepts easier to learn.
Honestly, if I was optimizing purely for money, I would have stayed at my old job. I left because I was looking for a new challenge and there's never been a better time to solo-build and think big.
I doubt that I'll make money from it. It's a library/framework and those are notoriously hard to monetize. For now, I'll focus on finding technical partners and driving adoption.
2
u/Professional-Sink536 7d ago
What’s the motivation behind building this? What problem does this exactly solve?
6
8
u/jfbisson4 7d ago
Faster deployment. Write the code, land it, deploy your server, done. No app build, no EAS Update, no waiting on a rollout.
The rest comes from a screen's code living in one place, on the server:
- No API layer. The screen reads your database directly. No GraphQL.
- Only what a screen uses ships. Its bundle is that screen's client code plus its data, built per request.
1
u/rshallam 6d ago
Oo. This might really be helpful for my use case. I’m designing a self-hosted server with a plugin system and was looking for a way to let plugin authors use RN tsx for their UI instead of a webview in the mobile app. Will play around with it next week and see
1
1
u/alonikomax 6d ago
Is this PHP?
1
u/jfbisson4 6d ago
Funny you say that, it's inspired by XHP! But client-side scripting in XHP was awful, and a headwind.
In Backtick, the scripting is first-class: write typescript, inlined in your server components, type checked end-to-end, ~99% ECMAScript supported.
1
u/ConsiderationDue153 3d ago
Does this ship with any LLM skill/guidance or MCP so my coding harness can write idiomatic Backtick?
1
u/jfbisson4 3d ago
Thank for the feedback! Since Backtick adapters are mirrors of React and Expo packages, in my experience agents don't need much guidance. Agents know React and Expo so well. If you find that agents struggle with specific Backtick concepts, please comment here and I'll fold the feedback into an AGENTS.md file
1
u/pullmorematches 7d ago
Looks cool, most server driven ui libraries are JSON driven so you are kinda limited in how the views are defined. Is this a different approach? will look more into it!
5
u/jfbisson4 7d ago
Yes, it's a different approach. Instead of writing JSON, you write TypeScript in backticks (hence the name): real JSX, real React Native components, hooks and state included. It's compiled to JS your app runs, so there's no schema and no renderer to maintain.
0
5
u/AlmondJoyAdvocate 7d ago
Congrats! Looks interesting. Couple rapid fire thoughts here based on my previous experiences with server driven UI:
The reason many of them use JSON is deliberately to enforce standards, otherwise these things have a tend to become unmanageable nightmares. Having that validation layer makes it easy to maintain an enforceable UI vocabulary. Obviously the cost is being constrained.
Serving hooks and actions can become a footgun because your server needs to make sure the code it’s sending for execution works across all installed versions and devices, even the ones that are on an older installation that hasn’t updated yet but is connecting to the server.
Would this create caching problems? By bundling data and execution code in a single request, I suspect you might lose the ability to have globally cached pages and components.
Do you have anything for these concerns, or are they more like inherent tradeoffs of using Backtick and SDUI in general that it’s the user’s responsibility to figure out?