My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Royal Jain

37 likes

·

525 reads

20 comments

Jenis
Jenis
Feb 6, 2024

I understand the concerns raised in the article but i am not agree with some point

=> While it’s true that Next.js has introduced new features like Server Actions, these are aimed at enhancing the capabilities of the framework. The learning curve might be steeper, but it’s a trade-off for more powerful features. The documentation is comprehensive and is continually updated to help developers navigate these complexities.

=> Transitioning from page router to app router was a significant change. However, it’s important to note that changes in major versions of any software can lead to breaking changes. It’s part of the software evolution process. Learning about Server Actions is indeed required, but it’s a one-time effort that can unlock more powerful functionalities.

=> Next.js does have some limitations, like the 1Mb request body limit. However, these limits are often set for good reasons, such as preventing Denial of Service (DoS) attacks. For use-cases that require larger payloads, alternatives like using a separate API server or storing the data in a cloud storage and sending the URL in the request could be considered.

=>Comparing Next.js with a simple Express server might not be fair. They serve different purposes. Next.js provides a full-fledged framework for building server-rendered React applications, while Express is a minimalistic web application framework for Node.js

at last i want to said that remember, every technology has its pros and cons. The key is to choose the right tool for the job based on the specific requirements of the project. ☃️

17
·
·1 reply
Royal Jain
Royal Jain
Author
·Feb 6, 2024

Well said, valid points. My core observation is that to solve for advanced use cases - NextJs has traded off its core value prop - simplicity. Which is very important for its core audience - full stack developers.

2
·
Abhishek
Abhishek
Feb 6, 2024

This is exactly what I went through few days ago. I was trying to setup simple prisma+mongodb logger in NextJS but could not even start mongo connection in server action. Similar setup in Page Router was so easy.

8
·
Nocturnal
Nocturnal
Feb 8, 2024

i feel it's still a choice, with 'use client' directive one can easily skip server-side rendering plus server actions are not mandatory as such

5
·
·1 reply
Royal Jain
Royal Jain
Author
·Feb 8, 2024

Yes, but then what's the point of nextJs :) ?

For me, the major issue was API routes are not configurable easily

2
·
André Casal
André Casal
Mar 18, 2024

Good points Royal Jain! That's why I switched to Remix: what a first-class DX ⭐️

Once you get some of that sweet sweet routing, prefetch, hot module reload, and hot data reload DX you won't go back 👌

Speaking of first-class DX, I’m building an amazing UI library for React and I'm looking for React devs, disatisfied with the current state of UI tools, excited for this type of product, and who enjoy giving feedback on mockups and product ideas (here's the landing page: verveui.pro). Twitter link on profile :)

3
·
Kevin Naidoo
Kevin Naidoo
Apr 18, 2024

Interesting article. Have you tried Django? One thing I like about Django is it has a clean architecture. You basically can build "modules" called apps and share them across projects.

Using Python is also a breeze, with no weird types (even though Python is strongly typed).

The thing about Django is it's been around since 2005 or thereabout, but has maintained its core feature set and does not break backward compatibility (If you don't count the python 2 vs 3 saga, but still even that wasn't too bad.).

Sure there are lots of new features, deprecations, and so on but there hasn't been a monumental shift every year/few months like with NextJs.

Skills I learned 5-10 years ago are still very useful in Django 5 today because the framework largely works the same.

This doesn't mean that they don't innovate, they have also had to keep up with the FE world, SPA's, and so on but yet again somehow have managed these transitions very smoothly.

Django comes with most of what you need for most projects, so you are not as dependent on third-party libraries or services.

Django is Python-based, so naturally all the libraries you get with Python are available including machine-learning libraries like Pandas, Pytorch, and so forth.

Finally for the frontend, you can still use React but also there is HTMX and "Django Unicorn" that can get you quite a bit of mileage without the complexity of the whole TypeScript ecosystem.

3
·
·2 replies
Ashish Agarwal
Ashish Agarwal
Apr 30, 2024

To me, I prefer flask with Jinja. I know django too but it goes a bit hard since I'm not aiming for a website that has just blog, because who change portfolio names anyways?

Additionally, loading CSS and libraries manually seems too boring. React is great as it does it all and specifically, the soft navigation!

(I wanted to learn react only to have a soft navigation because who wiill do the boring task with pure HTML-JS anyways?)

1
·
Kevin Naidoo
Kevin Naidoo
Apr 30, 2024

Ashish Agarwal Cool yeah Flask is very lean for an API, I stopped using it at some point and moved to FastAPI though for machine learning stuff.

·
K Koyal
K Koyal
Feb 9, 2024

I must say that next.js is complex, although I have just started using it.🙃

2
·
·4 replies
Manas Sharma
Manas Sharma
Feb 17, 2024

I'd started from Pages dir and it was a breeze compared to new version.

1
·
K Koyal
K Koyal
Feb 18, 2024

Honestly I'm stuck if you refer me some online resources it would be a great help Manas Sharma

·
Manas Sharma
Manas Sharma
Feb 19, 2024

K Koyal If you want to build something complex then I would suggest to use pages dir as it is pretty stable. I've learnt mostly by following their docs on pages dir here

nextjs.org/docs/pages/building-your-applica..

If you want some visual content then you can check out this channel

youtube.com/watch?v=9P8mASSREYM&ab_chan..

2
·
K Koyal
K Koyal
Feb 19, 2024

Manas Sharma Thankyou so much for taking your time and sharing this 🌟

·
Manas Sharma
Manas Sharma
Feb 17, 2024

I faced a similar issue in App dir, I tried to setup a simple CMS setup with React Query and SSR but it didn't worked, wasted two days figuring out issues then eventually shifted to pages dir.

1
·
·2 replies
Royal Jain
Royal Jain
Author
·Feb 20, 2024

Yep, happens ever so often. App router in not there yet, and shouldn't be the default

·
Go88
Go88
Mar 8, 2024

Royal JainTrong trò chơi The Witcher Go88, người chơi sẽ được trải nghiệm cảm giác hồi hộp với 243 cách thắng khác nhau được cộng dồn. Điều này mang lại sự đa dạng và kích thích cho mỗi ván chơi. Chi Tiết: go88vn.pw/the-witcher-go88

·
Thomson
Thomson
Apr 3, 2024

I've decided to move away from Next.js due to its steep learning curve and complex setup. While it offers server-side rendering and routing benefits, alternatives like Create React App provide simpler solutions without sacrificing performance. Additionally, maintaining compatibility with Next.js updates can be cumbersome. Simplifying my development stack allows for faster iterations and smoother workflows.

1
·
·1 reply
Royal Jain
Royal Jain
Author
·Apr 4, 2024

very well put

·
Nader Ikladious
Nader Ikladious
May 2, 2024

I agree on the struggle of working with Next.Js to accomplish simple things, which if we go back to the basics of just serving things from the server will do the same thing.

Some applications might need this complexity tho to accomplish FE heavy computations, etc.

But for most of the websites that I See today, they also tend to go in the FE frameworks when it might not be needed so they end up complicating their life

·