Solito is the missing piece for using React Native with Next.js to build powerful cross-platform apps.
Solito reached #3 on the front page of Hackernews. Check out the post here.
This library is two things:
- A tiny wrapper around React Navigation and Next.js that lets you share navigation code across platforms.
- A set of patterns and examples for building cross-platform apps with React Native + Next.js.
In 2021, I spoke at Next.js Conf about how I built beatgig.com with Next.js and React Native.
Since then, a sizable community has grown around this stack. The goal of this project is to bring together the hardest piece of cross-platform development: navigation.
If you haven't seen it yet, I recommend you watch the talk:
In June 2022, I spoke about Solito at App.js Conf in Poland. In that talk, I also released the first version zeego, a cross-platform menu library I built inspired by Radix UI.
Little by little, I released a number of libraries dedicated to Next.js + React Native.
One of my first,
expo-next-react-navigation, was the earliest iteration of Solito. I used this for a few years as I built out BeatGig. Eventually, I realized that the API was too convoluted to work as a replacement for
next/router. Then React Navigation released a great API for navigating around with URLs, and I realized that that would be the future.
I opened an issue on
expo-next-react-navigation called "The Future API" where I thought through all the necessary steps to truly unify the stack.
Next, I worked on a PR with Axel Delafosse, hoping to share navigation code between Expo + Next.js. That PR has nearly 100 comments from people in the community chiming in on my ideas. Ultimately, I dropped the approach I built in that PR in favor of a simpler, headless navigation method. And there, Solito was born.
The rabbit hole
If you are curious about my journey working on Expo + Next.js, and how I arrived here, I recommend doing a few things:
Watch my Next.js Conf talk.
Follow me on Twitter and read through my tweets.
a. For example, in this issue on the Dripsy repo, I explained my desire for a high-performance, simple animation library. That idea became Moti, which is now one of the most popular libraries for animating in React Native (+ Web).
b. I spent a lot of time trying to add SSR support to Dripsy to Next.js, and ultimately dropped it due to limitations from React Native. If you do some Googling about React Native Web's Server Side Rendering support, you'll find me talking about it.
Listen to this episode of React Native Radio, where we discuss Expo + Next.js.
Read the introduction of the Moti docs, where I shared my thoughts on the state of React Native.
Special thanks to Axel for sharing my love for this stack and for coming up with the idea of an Expo + Next.js "metaframework".