8 ms·
> 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
by egeozcan 8y ago
> 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.
- midway 8y agoPls 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.
- egeozcan 8y agoAnd 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.
- midway 8y agoThen why don't you just use the automatic code splitting of CRA?? And it's not generic, if you ever worked on a years old code base you are happy if complexity is low. Do you know if all the page transition libs will play well with Next? They do not play well even with react-router, the standard React routing lib. Code can be more complex than you might think.
- egeozcan 8y agoSSR. CRA and Next.js are "templates" more than libraries with different aims. If you have specific arguments against SSR, just tell them because otherwise the discussion doesn't make sense.
- sebdedeyne 8y agoI see Next.js more as a build system than a framework / library. Of course it adds complexity, but in a comment above you say that "CRA does that too". You're not introducing any more or less complexity than CRA.
- chrisco255 8y agoCRA is a SPA. Next.js is not. When you hit a page in Next.js, it can prefetch and hydrate the data before it sends it down to the client. CRA cannot do this. First the client has to load the app, then the app has to fetch data from the server.
- davnicwil 8y agoIf you're already on create-react-app or any other framework or stack and don't want to port to a new framework, but want to add easy "just works" SSR, you can use react-frontload. https://github.com/davnicwil/react-frontload https://github.com/davnicwil/react-frontload It's a small library that lets you load data into Components - using the same code on both client and server render. You can use it to add server rendering to any existing React app. It's designed to just plug in and work. I'm the author :-)