Creator of Solito here. I've built a number of React Native libraries (Moti, Dripsy, etc). Happy to answer any questions. I originally gave a talk at Next.js Conf about how/why we use Next.js with React Native: <a href="https://www.youtube.com/watch?v=0lnbdRweJtA" rel="nofollow">https://www.youtube.com/watch?v=0lnbdRweJtA</a><p>Navigation is the hardest piece of sharing code across platforms. Web has plain URLs for navigation state, whereas apps have complex sets of nested navigation patterns (stacks, tabs, modals, drawers). By combining the approaches into a single mental model and API, devs can build for Web and Mobile with ease. This is touched on at length in the "Methodology" and "Gradual Adoption" sections of the Solito docs.<p>The gap between web devs and native devs is shrinking. This stack enables you to ship native apps and websites with a single codebase. I'm the only frontend engineer at our startup, and I was able to do just that as we scaled to thousands of users (see <a href="https://beatgig.com" rel="nofollow">https://beatgig.com</a>). My goal with Solito is to 1) provide the code to let others do it, and 2) perhaps more importantly, document clear patterns to deal with platform differences.
This looks cool, nice work! As an alternative, if you’d like to have a single web-based codebase for iOS/android/pwa/etc using Next.js then you might like this approach using Capacitor: <a href="https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-starter" rel="nofollow">https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-st...</a><p>The benefit over using RN for this is being able to use libraries like Tailwind on all platforms and having a true single codebase.
For anyone interested, here is the keynote introducing Solito from Next.js Conf 2021 by it's creator Fernando Rojo.<p><a href="https://www.youtube.com/watch?v=0lnbdRweJtA" rel="nofollow">https://www.youtube.com/watch?v=0lnbdRweJtA</a>
I suspect I'll end up using this ASAP just for the useParam hook, as it's a pattern I like quite a lot (page state as query params) and is a big ol' pain to maintain and deal with edge cases.
Applause to Fernando for this. His work on react native open source has been incredible. Definitely check out his other projects Dripsy and Moti as well!
Wouldn't Remix be a better fit? It's easier to run in more client-orientated environments.<p>Currently, I like to have the API and web pages (signup, marketing, policies, etc.) made with Remix.<p>Then, the cross-platform app (native & web) can be made with React Native / React Native Web using React Navigation as the router.<p>I can certainly see being able to combine those two into one as a plus, but React Router / Next Router and React Navigation conflict. React Navigation is needed for a nice app experience.
"React Native and Next.js" sounded to me like you were trying to do server-side rendering for react native apps, it's the first thing I associated with 'next.js'<p>But this is more about navigation if I see this correct? So more in the direction of react-router
It's great that this is as much a library as it is documentation on good patterns for this.<p>I don't use react-navigation, so I won't be able to use the library. I actually arrived at a very similar setup of a Link component that is a different implementation per platform. I think it will become even more similar after learning from this code and documentation.
I didn't know React Native + Next.js was a thing? What is the goal of doing that? I don't know what problem Solito is solving, some helpful context would be nice for those of us who are foreign to the problem.
React Native + Next.js definitely has appeal to me. However, I'm not sure how future proof this API is. Unless I'm missing something, it looks like it locks you into data fetching at component render time. Facebook have been working hard in recent years to move away from that (<Suspense />) and routing libraries like React Location (<a href="https://react-location.tanstack.com/" rel="nofollow">https://react-location.tanstack.com/</a>) offering asynchronous routing APIs seem like more promising approaches long-term.
I don't get this.
Isn't the main benefit of next.js proper splitting of server/client code, prerendering and such?<p>None of that is needed on a native platform.