Earlier quoted context omitted.
Pls check my other comment, anything you add to your code adds complexity and a natural lock-in. Maintainable code is not about adding every lib which crosses your way.
And what I'm saying is that Next.js does add the same complexity that you would add yourself but with great documentation. Also I have to say that's a very generic argument for any library.
Next.js 8 released
41–50 of 118 posts
Re: Next.js 8 released
#42Earlier quoted context omitted.
SPA? SSR?
SPA = Single Page App SSR = Server Side Rendered SPAs run in the browser, therefore they must be written in JavaScript (or something that compiles to it.) SPAs have the drawback of having to load a bunch of JavaScript before rendering anything, so the initial page load tends to be slow. Next.js gets around this by performing SSR for the initial page view, and then you're already looking at that page while all of the…
'web apps' is better.
Re: Next.js 8 released
#43Earlier quoted context omitted.
Simple, SEO. We want full SPA, but also want SEO to work without shaky unreliable prerendering. Hence server-side-rendering for SPAs. Some will tell you that it's for first time loading performance, but in this day and age, I doubt that even registers for business impact.
Still don't get it. Next.js gives you a vendor lock-in and its features are easily avail w/o Next (eg. automatic code-splitting, this is standard stuff in CRA, why the fuss?). If your business is about SEO then React is the wrong choice anyway. In my understanding SEO is about hundred-thousands or even millions landing pages, keyword management, content spinning, ultra fast loads, AMP, etc. This is really not the fie…
You get to use all the modern tools that React gives you, an abundance of open source React components, and get an SEO and load time optimized website with minimal configuration. Building a server rendered, dynamic web app is non trivial. Next.js makes it a lot easier.
React coupled with Node.js has been used for SSR since 2015 in sites like PayPal so I'm not sure why you doubt it's veracity. React is a very strong UI library that is more than suitable for multiple rendering targets. It has never been limited to SPA apps. Facebook itself is not a pure SPA app.
Re: Next.js 8 released
#44Earlier quoted context omitted.
> Next.js gives you a vendor lock-in and its features are easily avail w/o Next Think Next.js not like a framework but an SSR version of create-react-app. It's incredibly easy to port into your custom thing.
Pls check my other comment, anything you add to your code adds complexity and a natural lock-in. Maintainable code is not about adding every lib which crosses your way.
Re: Next.js 8 released
#45Earlier quoted context omitted.
> Next.js gives you a vendor lock-in and its features are easily avail w/o Next Think Next.js not like a framework but an SSR version of create-react-app. It's incredibly easy to port into your custom thing.
Pls check my other comment, anything you add to your code adds complexity and a natural lock-in. Maintainable code is not about adding every lib which crosses your way.
Re: Next.js 8 released
#46Earlier quoted context omitted.
Still don't get it. Next.js gives you a vendor lock-in and its features are easily avail w/o Next (eg. automatic code-splitting, this is standard stuff in CRA, why the fuss?). If your business is about SEO then React is the wrong choice anyway. In my understanding SEO is about hundred-thousands or even millions landing pages, keyword management, content spinning, ultra fast loads, AMP, etc. This is really not the fie…
Next.js gives you prefetching as well as code splitting as well as server rendering. You get to use all the modern tools that React gives you, an abundance of open source React components, and get an SEO and load time optimized website with minimal configuration. Building a server rendered, dynamic web app is non trivial. Next.js makes it a lot easier. React coupled with Node.js has been used for SSR since 2015 in si…
Prefetching is a questionable and a lot discussed feature, do you want to prefetch all the 50 links on my page? Even if you think this a great feature, I am sure the user using your page doesn't like that you abuse his/her bandwidth. Especially those on mobile.
> code splitting
This is not a feature. Automatic code splitting is turn-key-ready in CRA. I wrote this now for the tenth time...
> server rendering
I explained this, if you really need SSR, a plain express/pug blows Next out of the water. Speed, flexibility, routing, everything. There is no single reason to use anything like Next.js. And writing a plain express/pug app is trivial and much easier than React, this is 10 years old tech.
I don't want to sound negative but again why is React as SSR 10x better than typical SSRs? It's not, React is great for real SPAs and Next feels to me like, let's jump on the React hype train and generate organic leads for Zeit.
Re: Next.js 8 released
#47Holy crap, these pages load fast. Honestly the best possible advertisement for a javascript framework at the moment is how quickly the page paints. For me it was virtually instantaneous. Bravo.
I'm behind a mobile connection which has been acting up today. For me the experience on the website was pretty bad, as there were no loading indicators. I clicked on a link and it did nothing for several seconds. Since it's not a real page load, my browser did not show any indication of loading either. I'm not entirely sure what next.js does, but I would be wary of using this library due to the bad website experience…
I've used react-redux-loading-bar[1] in a recent small project of mine and it worked quite well so far.
I'm not sure about working with the native loading indicators though.
In general I quite like the way next.js is handling these things: It's pretty bare-bone but provides a lot of examples of how to do more advanced things.[2]
There's even an example for loading indicators: https://github.com/zeit/next.js/tree/canary/examples/with-lo...
[1] https://github.com/mironov/react-redux-loading-bar [2] https://github.com/zeit/next.js/tree/canary/examples
Re: Next.js 8 released
#48Earlier quoted context omitted.
I don't buy the vendor lock-in argument here. The vast majority of your code will have nothing Next-related in it, this is a sharp contrast to a lot of the other options out there. Your page entry points will have getInitialProps, but that's actually a pretty decent pattern I'd probably choose to keep even if I moved away from Next. The reason we actually went with Next is because it's relatively easy to drop if our…
Of course there is a lock-in. Every lib you use locks you in. You don't know how many libs don't play well together. The more code and libs you add to your app the more complexity. It's not hard to write code, it's hard to keep code complexity low and maintainable and IDK if Next.js helps here.
Re: Next.js 8 released
#49Interested to see serverless as part of a web framework. My understanding was AWS Lambda and similar platforms were best for asynchronous workloads, but for web stuff the cold start could be too long for things to feel snappy. Has that changed recently?
It actually works really well for render workloads like server-side rendering too, the reason for this is that rendering can be quite expensive and blocks the thread. With Serverless you're able to scale the renderer to infinite instances. The cold-boot problem is an interesting one, it's heavily correlated to the serverless function size, this is why we implemented a complete output target for serverless, to output…
Re: Next.js 8 released
#50Earlier quoted context omitted.
Of course there is a lock-in. Every lib you use locks you in. You don't know how many libs don't play well together. The more code and libs you add to your app the more complexity. It's not hard to write code, it's hard to keep code complexity low and maintainable and IDK if Next.js helps here.
Yes, all libs give you vendor lock-in, which means unless Next is a particularly egregious example, there's not much point calling it out as a particular wart. My argument is that it's closer to the opposite, because as far as web frameworks go, Next does this better than most -- very little of the code you write is different just because you're using Next, your code is just normal React code. This is a huge contrast…