4 ms·
On one end you have something like https://vike.dev https://vike.dev, very light framework. It might not have all the bells and whistles like Next but your code
by morbicer 2y ago
On one end you have something like https://vike.dev https://vike.dev, very light framework. It might not have all the bells and whistles like Next but your code is going to be your code and if you change your mind you should be able to switch to anything in the future.
In the middle you have something like Astro or Remix. More creature comforts but they try to be close to web standards. Remix forms can work without js.
Then on the opposite end you have Next. Monkey patching fetch method, headache inducing cache behavior (now probably finally gone by default), common breaking changes, strange middleware implementation, relying on unstable React features and most importantly the only-on-Vercel features: Incremental Static Regeneration, image optimization etc. No other framework needs sth like https://opennext.js.org/ https://opennext.js.org/
- blovescoffee 2y agoWe have some marketing sites that are static and Next on cloudflare is working perfectly for us at a large company. Fair enough if you don't like it. It is the most popular framework (or top 3) and hasn't scared off its user-base in spite of the issues you listed. Maybe those aren't the primary concerns (or dealbreakers) of most projects?
- morbicer 2y agoMarketing sites are usually short-lived. They can die with the platform and it's fine. The OP is building their product on top of Next and was asking about lock-in. I work with React codebases that are 8+ years old. Luckily no-one chose sth like Next so there is a flurry of additional libs, some fell out of fashion today but none of them prevented the app to evolve or be deployed wherever. There is so much money in Vercel that I don't expect Next to die anytime soon but if sth more cool appears people on Next will have hard time migrating. Where someone sticking to more vanilla React can even easily switch to Solid or another non-React jsx solution.
- jsk2600 2y agoThank you. I've seen 'only-on-Vercel features' mentioned in the past, but so far, I have yet to find any specific examples of classic 'vendor-lock' in a sense 'if you use this it will not work anywhere except for Vercel'. AFAIK you can self-host NextJS apps with docker, albeit some features may not be as efficient as on Vercel they will work. This seems to be the case for both of the examples mentioned—ISR [1] and image optimization can be done on CloudFlare for example. Am I missing something? Don't get me wrong I'm not affiliated with Vercel, I'd like to think we can still switch from Vercel-hosted NextJS to self-hosted Docker in the future if we want which was my impression so far. [1] https://stackoverflow.com/questions/75526234/how-can-i-use-next-js-incremental-static-regeneration-isr-when-deploying-on-do https://stackoverflow.com/questions/75526234/how-can-i-use-n...
- leerob 2y agoThis is covered in the linked blog post for Next 15, including a demo repo, videos, and new templates here: https://github.com/nextjs https://github.com/nextjs
- morbicer 2y agoYes luckily a lot of talented people are sharing their workarounds so you can host on AWS or Cloudflare with most feature parity and in plain nodejs docker with some loss. But it's a constant game of catch-up for these folks.