Closed joamartico closed 2 years ago
It seems to be targeting users who already have a project consisting of SSR. In fact, Next has many advantages than I thought.
And i think there seems to be nothing new about this project without nextjs.
Oh I understand. Despite that, it would be awesome to SSR an Ionic App. What's exactly the reason Next.js can't SSR Ionic? I know it can do it with the javascript vainilla ionic but it is not exactly what Im looking for
Basically, you don't have to SSR in ionic. because ionic doesn't need a client web server. If basic logic was constructed using functions such as getInitialProps, it also would work normally in CSR.
Perhaps if what you're trying to do is to configure only html and css as pre-configurable as possible, then the ssg build of next.js can be used with ionic.
Tank you so much! I'll try SSG in Next.js with Ionic, I didn't know it works
Just wanted to add my experience. I am building out a mobile app with Tailwind/Ionic/React using create react app with typescript. You definitely don't need to use next.js. Anything should work.
Sure, but in my case I'm building a PWA so the SEO and the performance are things that I'm trying to improve and Next.js with SSR or SSG could be of great help
Just wanted to add my experience. I am building out a mobile app with Tailwind/Ionic/React using create react app with typescript. You definitely don't need to use next.js. Anything should work.
How did you get TailwindCss to work without NextJS? I've been stuck on it forever
How did you get TailwindCss to work without NextJS? I've been stuck on it forever
Dude, TailwindCSS has official docs for Next.js https://tailwindcss.com/docs/guides/nextjs
If I don't do web development, I don't need nextjs, is that correct? Routing is left to ionic, no SSR is done, no SEO measures are required.
Just wanted to add my experience. I am building out a mobile app with Tailwind/Ionic/React using create react app with typescript. You definitely don't need to use next.js. Anything should work.
How did you get TailwindCss to work without NextJS? I've been stuck on it forever
Tailwind has docs for setting it up with create-react-app (which Ionic Framework uses internally). Unfortunately, you need to use CRACO to take advantage of the purge CSS mechanism without ejecting.
There are two advantages for this starter with NextJS:
next export
, which decreases start-up-time of your app. WebView must parse all your JS before the first view can be rendered. In the case of the PWA, the JS must be downloaded and parsed. Especially on lower end devices, the parsing can consume quite some time.Still, it feels a little overkill to use NextJS to generate a fully client-side app just to use TailwindCSS.
I think Next.js is probably overkill for this usecase but I also see Next.js as a quality production React framework. You don't have to use the SSR features of it to get a lot of other benefits, and it gives you the option to share code with perhaps a second sub-project that does have SSR enabled.
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)
Part of my goal in building this was to see if there was demand for a stack like this and hopefully communicate that through user interest with the Next.js team to hopefully support these export
use cases a bit more thoroughly. Time will tell how that shakes out
I think Next.js is probably overkill for this usecase but I also see Next.js as a quality production React framework. You don't have to use the SSR features of it to get a lot of other benefits, and it gives you the option to share code with perhaps a second sub-project that does have SSR enabled.
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)Part of my goal in building this was to see if there was demand for a stack like this and hopefully communicate that through user interest with the Next.js team to hopefully support these
export
use cases a bit more thoroughly. Time will tell how that shakes out
Thanks for your reply, Max. But which are those benefits that Next.js provide? Improves the SEO although the project is not SSR nor SSG?
When I saw this project, I thought "great, at last I can easily do search engine optimized progressive web apps". In 2020/Q1 I tried combining NextJS and Ionic coz of Ionic's great toolbelt and and the sovereign SSR/SEO capabilities of NextJS but gave up. As they are now married, it would be great if SSR would be included in this project. It would be just wonderful for SEO of PWAs. Anyway, thank you @mlynch for many great Ionic starters during so many years!
Isn't it the same as using Ionic in React.js without Next.js? Or it has some benefits?