News for hackers. Stuff that matters.
Re:Solito – React Native and Next.js unified by yesimahuman on Monday March 14, 2022 @05:50PM (#30678891)
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: https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-st...

The benefit over using RN for this is being able to use libraries like Tailwind on all platforms and having a true single codebase.

Re:Solito – React Native and Next.js unified by fernandorojo on Monday March 14, 2022 @10:57PM (#30681232)
I don't view a single codebase as the goal necessarily. While I see the benefit to doing a WebView everywhere, I prefer the React Native approach: write once, run anywhere by using the underlying native components of each system. Because it has such a great unified API for building UI, React Native is a good abstraction to use the same code everywhere. But what draws me to it is the fact that it maps onto native elements.

That said, I'm sure there are good arguments for Capacitor!

Re:Solito – React Native and Next.js unified by jackconsidine on Monday March 14, 2022 @09:59PM (#30680942)
I'm a fan of Capacitor and Ionic for the reasons you mentioned. That said, they sit in a web view, whereas this library seems to support true native navigation which is really exciting.

Also check out tailwind-rn for using Tailwind classes in React Native. The latest version even supports Tailwind 3 JIT compilation so you're bundling minimal TW class adapters.

Re:Solito – React Native and Next.js unified by replygirl on Tuesday March 15, 2022 @09:09AM (#30684761)
and only at the expense of search discoverability, rich previews, and potentially a lot of performance on all platforms :)
Re:Solito – React Native and Next.js unified by redbar0n on Wednesday March 16, 2022 @09:27AM (#30698513)
at the expense of search discoverability?
Re:Solito – React Native and Next.js unified by replygirl on Thursday March 17, 2022 @09:55PM (#30717934)
yeah dude. loads all the pages dynamically with SSR off: https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-st...
Re:Solito – React Native and Next.js unified by redbar0n on Friday March 18, 2022 @06:09AM (#30720320)
wow, that's a weird limitation.

The README says: "SSR is currently disabled for the Next.js app as the app will be fully client-side rendered for iOS and Android. This is a limitation we are working to address in a future update."

I guess it's because CapacitorJS pre-bundles the entire PWA for the App Stores:

"Of course, you also could load the app completely remotely by changing the server.url configuration for Capacitor to point to your SSR'ed Next.js app, but that has other challenges such as App Store approval if the app doesn't check the boxes for Apple to qualify it as an app that has enough native integration (at that point this is on you, not Capacitor)"

https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-st...

But I don't understand why SSR would be disabled for the NextJS PWA on the web?

Maybe the creator Max Lynch aka. @mlynch aka. @yesimahuman could provide some insight here.