Hacker News new | past | comments | ask | show | jobs | submit login

"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'

But this is more about navigation if I see this correct? So more in the direction of react-router




React Native + Next.js refers to using the same code in both a native app and website (built with Next.js).

The hardest part of sharing code between apps and websites, however, is the navigation code. Websites have flat navigation. You have one page mounted at a time. When you navigate to another page, the original one unmounts and a new one renders.

Native navigation has a different paradigm altogether. Rather than use simple URLs to account for most of the navigation state, native apps have complex tabs, stacks, and more. When you change tabs on Spotify, you expect the previous tab to maintain its state, scroll position, nested screen, etc.

Given all of these considerations, it's previously considered impossible to use the same code for apps and websites, even if they're all written with React.

Solito solves the navigation problem by offering a unified API across Web and Native. This lets you write your code one time with React Native, and use it on both iOS, Android and Web.

From the docs:

> Solito treats URLs as your source of truth. Your Next.js app and React Native app don't communicate at all. They live in total isolation. Solito works by doing this: give me a URL, I'll detect what platform you're using, and then I'll figure out how to navigate to the screen for that URL.


I also was expecting to see some sort of SSR, got clickbaited


RN views can already be SSRed for a while now.

The problem has never been SSR but the divergent navigation patterns/state between web and mobile, for which it's not easy to build a shared abstraction.

Looks like you feel clickbaited because you are looking at this on the surface




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: