4 ms·
I may have missed it, but what makes Remix able to run SSR at the edge? Can you not do that with NextJS?
by lefrenchy 5y ago
I may have missed it, but what makes Remix able to run SSR at the edge? Can you not do that with NextJS?
- Rauchg 5y agoYou absolutely can! The data loader concept in Remix is semantically equivalent to `getServerSideProps` We are making sure both Remix and Next.js work excellently at the edge by compiling down to our Edge Functions primitive (https://vercel.com/edge https://vercel.com/edge)
- DenseComet 5y agoI was under the impression that most of Next's server side capabilities, outside of the recently introduced middleware and react server components, required a node environment. I know Vercel does offer multiregion capabilities for enterprise and a bunch of smart things to make sites faster, but its still not the same as being able to do everything on edge the way remix advertises.
- Tomuus 5y agoOne of my favourite things about Remix, and where it beats Next IMO, is that you can deploy it anywhere. Bring your own server. Whereas trying to deploy Next.js anywhere other than Vercel is a nightmare.
- playpause 5y ago> Whereas trying to deploy Next.js anywhere other than Vercel is a nightmare. I’ve never heard this before. Why is it a nightmare? Isn’t it just a Node app?
- jstummbillig 5y ago> Whereas trying to deploy Next.js anywhere other than Vercel is a nightmare. If it ever was, this certainly isn't true right now. I have very recently built a small, perfectly capable website with a colorful mix of Next.js functionality and deployed it on my own server. Happy to report that it really is as simple as the docs make it seem: https://nextjs.org/docs/deployment#nodejs-server https://nextjs.org/docs/deployment#nodejs-server
- nsonha 5y agoI made my blog with Next.js which is deployed with github actions on gh pages, there was some tricky thing about static paths but that might have been fixed and if it was anywhere close to "a nightmare", I would remember.
- andrewingram 5y agoThis is (mostly) untrue. It's easy to deploy Next anywhere you can run a node server. What's more fiddly is deploying it somewhere that has its own special environment, like AWS Lambda, Cloudflare Workers, Netlify etc; basically "serverless". But adaptors do exist for most of these to make it fairly painless, they're just not part of Next itself. The advantage of Remix in this area is less that they've written their own adaptors for these platforms (do we really care who writes them, as long as they exist?), but more that the level of abstraction they've chosen appears to make it _easier_ to write these adaptors. Edit: Something I missed, is that Remix does appear to work on Deno, whilst Next doesn't.
- freedomben 5y agoI run 3 non trivial Next.js apps in prod. While I have used Vercel in the past, I'm not currently. One is completely SSG (served by nginx) which is absolutely amazing and is the killer feature that keeps me going back to next.js. The other two have node because they use next/Image. I do really wish there were a compatible Image with SSG, but it is absolutely not hard to run a node app in prod, and there's no difference between a node app and a next.js that needs node.