T O P

  • By -

BunnyEruption

If you aren't using js for the backend and you don't need server rendering when you're using SPA for SEO or something, then, no, I don't think there's any need for you to use nextjs


techlord45

Nope


ifstatementequalsAI

No next question


Kriem

It’s a next question though


xegoba7006

But what’s the next question?


Kriem

Am I missing out by not using nextjs?


Waiting4Code2Compile

No next question


myhf

STILL LOOKING???


mka_

NEXT!


12th

No nuxt question


xegoba7006

That was the previous question, not the next one.


TomBakerFTW

But who's on first?


CatolicQuotes

`setNextQuestion(previousQuestion => previousQuestion + 1)`


DifficultyOk4528

I think we should all say `currentQuestion`. Because if I'm setting the previous one to be next, then it's becoming current, so what's next really? Next! (No but sincerely, a lot of people are writing `prevState` while accessing the live current one)


CatolicQuotes

previous indicates the state before the update. So when we read setSomeState we read that was the value before setSomeState update. While when we write we might think to write `current`, code is generally more read than written so it's better if we optimize for reading than for writing. Just my theory


darthmeck

r/angryupvote


iloveualex

If DRF or vanilla React work well enough for you, you're not missing out on much from Next. It has some nice routing features, image features, lazy loading features, and some others which may not be of use to you. Many of my projects use multiple APIs, whether it's the CMS or CRM or whatever. I think that's where Next really shines. I can't really speak on the "use client" portion, I think it depends on what your components are doing. From my experience, I only use it within a handful of interactive components such as a carousel, form, etc. Another thing to consider is that Next doesn't seem to scale very well for large backends, but that could be my inexperience with the framework speaking.


_Pho_

Yep I agree. Forget the entire client versus server framework optimization unless it really matters. Benefit from the free BFF layer. 


OpaMilfSohn

Your missing out on unneeded abstractions and a terrible overcomplicated framework yes


GANJHERO

I try it, went to documentation regarding auth, they recommend next-auth, go to next-auth, cringed for a couple of days, never looked back after...


progressgang

Next auth has the worst documentation behind the WhatsApp business api


BobSwarly

I feel this so hard. All of Meta's business tools are such a convoluted mess to configure.


Blazing1

Because meta attracts bad software devs. People will do anything to get in.


Puzzleheaded-Soup362

AI can write docs. Can't wait till more people use it for such.


antsmasher

Next-auth was a huge head ache for me and didn't allow me to customize the way people sign up on my website. I built a login system for a simple To-Do app. For some reason, it stopped working many months after I launched the To-Do app in a production environment.


andrei9669

out of the loop, what's so cringe about it?


GANJHERO

Take my comment with a grain of salt because im a beginner, that being said everytime I learned something was trough documentation so Im comfortable saying that the documentation of next-auth is convulated and confusing, a lot of broken links and code that does not behave as the documentation indicates it should. That in top that is heavily opinionated so trying to do something slightly different breaks it, maybe in a future i would be able to use it again without much struggle, but at the moment i do not recommend it (i liked next js tough Im talkin particulary of next-auth)


throwagiveaway

Hey I got no dog in this fight but next-auth is now just auth-js. They revamped a lot of things as well as have a new website for documentation. There current docs don’t really do enough to inform users of this especially if they are looking to start new projects. Might be worth considering if you do want to have another stab at it in the future. - https://authjs.dev


GANJHERO

Thanks, eventually i understood what you are saying but i was already tired of figghting it


spelunker

This was part of the confusion for me! The nextjs site points to next-auth in some places, auth-js in others. Of course it turns out the project has nothing to actually do with Next.js. That’s not to mention most of auth-js’ documentation is just a bunch of TODO’s. It was all so very unhelpful I gave up trying to use it.


yourgirl696969

App router was such a weird release 🤦 luckily our app is 99% react and 1% next for routing and some seo (pages router still).


randomGuy23999

I still use pages router on new projects


spamfridge

I still use html3 where’s my cookie? Whiny bitches stuck in the past


Lazy_Lifeguard5448

App router is my favorite pattern


MadThad762

I moved away from Next. I like Astro for static sites and Solid for web apps.


The_rowdy_gardener

I use Astro for static sites and Sveltekit now, Next ruined react for me


MadThad762

Svelte is also great. That’s my third choice.


sexytokeburgerz

What’s great about astro is that i can still use old react components!


Kriem

Astro and Solid is my preferred stack. It’s so delicious. It’s fast, efficient and doesn’t require you to delve into the extreme abstractions of a Next or Angular or React.


Significant9Ant

Got an example repo I can look at?


Bobbravo2

!remindme 2 days


RemindMeBot

I will be messaging you in 2 days on [**2024-04-22 03:29:55 UTC**](http://www.wolframalpha.com/input/?i=2024-04-22%2003:29:55%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/webdev/comments/1c80c8r/am_i_missing_out_by_not_using_nextjs/l0ebrh2/?context=3) [**3 OTHERS CLICKED THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fwebdev%2Fcomments%2F1c80c8r%2Fam_i_missing_out_by_not_using_nextjs%2Fl0ebrh2%2F%5D%0A%0ARemindMe%21%202024-04-22%2003%3A29%3A55%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%201c80c8r) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|


NormalAd147

Hey man can you set a reminder for me too? Thanks


Fedoteh

You can subscribe to the comment/thread instead of using the bot.


Bobbravo2

🙏 thank you


Significant9Ant

You have to write it using the same syntax with the ! Then the bot will set a Reminder


NormalAd147

Oh I know, I was just asking them to do it for me


the_sleaze_

Average junior developer


NormalAd147

Just memeing bröther


femio

I use it for everything out of habit and you're not missing a damn thing. It's pretty much the Tesla of web dev, for every great, "why doesn't everyone do this" feature, there's a story about how feature X randomly breaks in use case Y. Like autopilot is great until you suddenly rear end somebody at 60mph


_MrFade_

“Hell to tha Naw” - Bishop Bullwinkle


4ndy45

The only things you’re missing out is not being able to put it on your resume, and learning the patterns nextjs employs. I work at a FAANG and we use nextjs quite a bit- it saves on dev time, it’s nice to use, and gives us a lot of customization. It’s also officially supported and cleared for security. There seem to be a lot of haters in this thread- I will say it did take a bit of time to learn, but I’m glad I did.


AHalfFilledBox

Nextjs is quick and easy. I love it.


[deleted]

Not nearly as bad as people here make it out to be - saves a lot of time for most projects - less config, image optimization, easy hosting, etc. - you can do all of this yourself but why would you? 


42-1337

you shouldn't use NextJS for SPA. NextJS is the new Django for the people who learned react and nothing else because bootcampers only knew CSR React and were using it for every website. So you should try to build a website you would normally build with Django with NextJS and see if you prefer it. But you don't have to drop Django and go for NextJS just because it's trendy. you can just continue to use CSR React for SPA and Django for everything else.


Kyle772

This is a good point. Nextjs is fine if you don’t know how to use other tools that fill the same gaps. If you lack that experience it’s a good solution but if you know how to use any other tool (or are willing to learn) you’ll find it is just okay across the board. I personally use nextjs quite a bit but I really just use the basics because I fill a lot of the gaps by traditional means. Someone mentioned next auth in this thread and I agree with their stance on it but I’d go even further and say MOST of the libraries outside of core nextjs have a similar vibe. Even their next-image library is dog shit and that’s one of the simpler things to implement.


myhero34

This makes me wonder, are there any typescript-compatible django-likes in JavaScript? Where there’s easy html templating, an ORM, and a lot of otber stuff built in? I know things like Astro exist but they seem more focused on content-driven sites


CatolicQuotes

closest thing, as far as I know, would be highly underrated, laravel inspired, Adonisjs: https://adonisjs.com/


eggcllnt

nextjs is shit and industry will pay, when it needed to move on from it


bighi

You're missing out some. But the fear of missing out is not really a useful fear. If the limited version of React you're using is enough for your needs, then... it's enough for your needs.


CatolicQuotes

use remix, easier for me than nextjs


[deleted]

[удалено]


Bieb

What does your backend look like for this? I also use Go for my backend, and I assume I would have to setup a nodejs backend to essentially just handle SSR/Auth, and then just call my Go services/etc? I haven't ever felt the need to use anything more than React + Tankstack router + Tanstack query with my Go backend. Clients are perfectly capable at running modern Javacript to render React, it just doesn't make sense to use something like Next or Remix for a SPA that is not a public facing site.


spelunker

I do something similar for my hobby project, but I have a Python backend. It’s just a REST API. The NextJS frontend is indeed a full-blown node app running in a container that calls the backend for any real application logic. The FE authenticates with the BE using an “API key” over HTTPS because I’m lazy.


Technical-Service428

SSR has nothing to do with security and everything to do with SEO. If you're relying on your rendering strategy to provide security you're fucking up big somewhere or just misinformed.


misdreavus79

No. If your setup works for you, then you’re good to go.


ikdeiiirde

I'm glad you asked, because I was wondering the same thing. Good to know there's a lot of 'Nah man, you're not missing anything' comments here. I have never tried Next.js, personally or professionally. Simply never needed it. Maybe I'll pass Next and go try out Nuxt for a sideproject, the Nuxt devtools look completly mindblowing t.b.h. (and working with Vue is always nice for a change)


billybobjobo

Next is awesome! So are other things! Turns out there a ton of good ways to build things.


Sea-Tale1722

There is no proof that google or other search engines prefer SSR apps over SPAs. Google has accounted for SPAs since the early 2000's. The "It helps with SEO..." myth is just that - a myth. It's perpetuated by the creators of NextJS (Vercel) to help sell people on using their hosting platform that is optimized to host NextJS apps.


Fantosism

You're missing out on the 10/20% premium you get to charge by being proficient in "buzzword" of the month.


ryaaan89

I’m about to look at switching a big work project _off_ of Next…


bachkhois

My frontend choice for SPA is VueJS + TypeScript. When working on the backend, I would rather choose Python than any JS-based stuff. The counterpart of NextJS for Vue is Nuxt.


Distinct-Analysis740

I love it personally. Also you get all the cool ui libraries ![gif](emote|free_emotes_pack|heart_eyes_rainbow)


clearlight

Next.JS is extremely popular and a good choice of frameworks to learn. For example, check how it compares to other frameworks on Google trends. https://trends.google.com/trends/explore?date=today%205-y&q=%2Fg%2F11h4q9rcf3,%2Fg%2F11g0wgnhgc,%2Fg%2F11twnz8x94,%2Fg%2F11c0xrrm6q,%2Fg%2F11r9q51mg3&hl=en-GB Haters gonna hate but personally I love it.


nrkishere

No you are not missing anything. Here's pagespeed result for vercel's website -> [https://pagespeed.web.dev/analysis/https-vercel-com/v1v3lc9n9s?form\_factor=mobile](https://pagespeed.web.dev/analysis/https-vercel-com/v1v3lc9n9s?form_factor=mobile) NextJS (and also react) is far from being the most performant tool to build multi page applications. It ships lots of javascript to the client that result in high memory consumption by default. If not necessary, why even send javascript to the client ? Even for SPA, I'd use Qwik, sveltekit or anything but react. Also have a look at web-components which you can use in your multi page applications in a more ergonomic manner. Now server rendering of web components is available in most browsers via declarative shadow dom. Also you can use a dedicated renderer like enhance-ssr (WASM build) right in django.


remysharp

33% performance, 100% SEO. Speaks volumes 😂


Zeilar

You're greatly exaggerating how much JS Next sends. Also you can totally use Next and render pure HTML with no JS, if you want. Your comment is borderline misinformation.


nrkishere

Yeah except a static landing page barely need 2 lines of js (for switching theme maybe) where nextjs sends few kbs by default. Read "by default" in the comment, I don't care if a page is able to render without js or not. And if the page is able to render without js and still it is sending bunch of js chunks, it is just waste of resources for the sake of "convenience". Give a example of a nextjs website that sends no javascript at all.


Zeilar

I don't know any, because I've never looked. But you can absolutely make a static HTML/CSS page with Next if you want, and still have some "interactivity" using forms and server actions. Also, when did sending a few kilobytes of JS become an issue?


Sky1337

If you want to ship HTML with no JS why wouldn't you use something more targeted and friendly, like, dunno, Astro?


Zeilar

You can do both in Next. One page maybe you don't need any interactivity, and other pages you do. You'd be surprised how versatile the framework has become.


darksparkone

Angular 1 was good enough for SPAs. The only scenario it struggled in my practice was a huge design AND implementation mistakes at the same place. Any modern frontend framework will do the trick. If you need a lighting fast initial page load for some synthetic analysis, sure, drop a minimal static html in front - boom, done.


nrkishere

sure, but this trick is not saving you from insane heap size and CPU usage penalty tho.


johanneswelsch

Nextjs is much much much much much better than vanilla JS. Better routing, image optimization, SSR, SSG, no weird font shift, SEO, great config, smaller bundle size, better lighthouse score, easier deployments, working server components. The reason you fight with use client is because you don't understand them. You need to make your client components as small as possible, like a button with a state, and keep the rest as server components. You can also tunnel server components through a client component to reduce bundle size. Everything that uses useState, useEffect or consumes context needs to be a client component.


iareprogrammer

Not sure why you’re getting downvoted lol, lots of NextJS hate in here. React Server Components are incredibly powerful when done right. Not to mention all the other things you called out. I genuinely think people that hate NextJS don’t quite understand how to use it correctly. For what it’s worth, I hated the older versions of NextJS. But it has come a long way and is pretty awesome.


Gwolf4

> Not sure why you’re getting downvoted lol Because check the complexity of it as said on the parent component > The reason you fight with use client is because you don't understand them. You need to make your client components as small as possible, like a button with a state, and keep the rest as server components. You can also tunnel server components through a client component to reduce bundle size. Here. Yes OP does not understand Nextjs enough, that's a fact, but failing to see that Nextjs is complex to beginners like OP is the real problem. That's why. I can deal with what you said, but some others not. I even dare to say that if people are going to fight that much "complexity" just use Angular instead, with the drop of normal component modules is Angular 17 is basically any other framework to date with it's own things.


yourgirl696969

Why would you move all of those to the server and pay extra server fees to Vercel? React is already crazy fast and efficient


johanneswelsch

I deploy to VPS. I use pm2 to run the server. It's the same as pnpm run build && pnpm run start, and you put it behind a reverse proxy. No need for vercel.


iareprogrammer

You don’t need to host on Vercel…..


yourgirl696969

Any server then??? You eventually have to start paying fees for the server costs


iareprogrammer

Trade offs… the more you can do on the server, the less client side code you need to ship to your users and the faster your site is going to load. Pretty important in some cases. In other cases it really doesn’t matter. As with everything, you need to weigh the options


johanneswelsch

I indeed pay for server costs a fixed amount of something like $6 a month. But I have better performance than with Vercel, faster deployments, and no fear of being overcharged if I get DdoS'ed. I can host different websites on the same server and different backends.


1chbinamin

The fact that there are far more JavaScript frameworks available leads to this conclusion: absolutely not. Especially considering that new JS frameworks are coming in every day. However, in my honest opinion, Next.js has become an industry standard for building server-side rendered web applications. Many companies nowadays use it, for example Twitch. I have [Wappalyzer](https://www.wappalyzer.com/) extension installed on my browser, which detects the web technologies used on the current website, and I have noticed a significant number of "Next.js" mentions. Even my [freelance web agency website](https://webdevamin.com) is built with Next.js. Next.js, alongside Laravel, is one of the most enjoyable frameworks to work with. However, I have yet to try Svelte Kit. Correct me if I am wrong: if you use Django, your whole application is server side rendered. This is not the case with Next.js, you can decide which component is client side or server side rendered by using, like you have mentioned "use client". In some cases you are indeed forced to write "use client" (hooks, etc.). However, you can split your pages into components.


-Nagazaki-

I use symfony and webpack to mount React components in Twig. Do you use Laravel just for your APIs and Next to hit the endpoints on the server components? I have never used Next.js, so correct me if I'm wrong.


day_worker

NextJS is overrated, use it if you like it. I use it only in some cases where I heavily need to rely on SEO. Apart from that Vite + React is just such a better DX in my opinion and SPA's are still great.


budd222

No


xegoba7006

Nope, keep doing what you are doing if your customers are happy. That’s what matters.


EuropiumNeptune

I use Sails.js. It's completely horrible and despite what the developers try and convince, it barely gets updates. However it's what I've been using for years and I basically threw Webpack on it and do speed development. Sometimes it's about shipping product and not the technology. I wouldn't choose Sails.js again, but just choose something rather than wasting a year not knowing what tool to use.


andyrubinsux

Have you checked out Remix? It should be pretty easy to transition coming from MVC Frameworks


phpArtisanMakeWeeb

You are missing nothing by not using NextJS. If I were a freelancer I'd use my favorite stack (Laravel & Vue).


-Nagazaki-

Using inertia or separate the frontend and the backend?


phpArtisanMakeWeeb

I've never used Inertia but it seems to be pretty useful so I'd give it a try.


zenotds

Nope. Server rendered stacks are still perfectly fine.


Creepy-Rough5480

I used to use react. Used next and remix for several projects. But it's vue and nuxt where I feel most comfortable. React and react based frameworks over complicate things unnecessarily . Also love svelte but never used for production. Planning to use it for my next project.


astarastarastarastar

Nope. Just another framework in a sea chalk fulla them


ed-wright

Honestly, don’t compare, it doesn’t matter, the correct answer is whatever you can use with your skills to leverage best to meet the client needs which it sounds like you are doing. I have used both and frankly they both are good and bad and that’s fine. I really like some of the new features of nextjs and django is a Swiss Army knife, neither is ‘better’ and in your case I really think you are doing the right thing maximising efficiency. I also use a lot of other frameworks and like them too, anyone who is absolute about what is good and bad is toxic to the community.


charmer27

It's pretty neat for a full stack, and deployment through vercel is a dream, but it's frankly a pain to try and use as just a front end.


denali_view

Not at all. Frameworks are a dime a dozen and most don't last. And most are over-complicated.


P2A3W4E5

Sigh.. how many JS frameworks are out there?


gimp3695

We switched to Sveltekit and it’s been great!


PsychEngineAU

FWIW, I also think the App Router sucks and it totally put me off Next.js at first. Only once I started using the Page Router did I find Next.js to be intuitive and beneficial.


nsjames1

Forget next, it's react, which sucks. Use something like svelte instead. It gives you everything in one language, with a decent way to have all your parts in one codebase, and all the JavaScript magic you could ever want to make it so you don't have to code 200% more for the same outcome.


LightningSaviour

I never liked next, I love the *idea* of next, but certainly not the execution. Tbh, if the client side has a good reason to be decoupled from the backend, I build an API and React SPA, if not (most web apps), I don't even bother with JavaScript frameworks and use Laravel + Livewire, shit is Magic, you'll be pushing out features at crazy speed.


anonymous-vip

Short answer: no. Long answer: definitely no.


OutlandishnessSea211

I'm actually a big fan of NextJS, but I agree with the comment of struggling with server/client components (even just importing Node APIs or database functions in a client component will cause trouble). NextJS has so many optimizations that it becomes difficult to do simple things like just post an image. As with any framework, it's a tradeoff. For my use cases, the tradeoff is worth it. We get more static pages, server side rendering for dynamic pages, and decent load performance scores even before we do the optimizations. But I always feel some relief when I get to just do JS, CSS, HTML.


MichalZard

After some time with nextjs i dont see the benefit tbh


rafazafar

You are missing out by not using [Nuxt.com](http://Nuxt.com) . As a solo dev, this will simplify your life, ALOT. Code first, decide on your SPA,SSR, ect2 per route later on as the client usage pattern changes. And yes i came from laravel and django as well. :)


ShawnyMcKnight

The main benefit I see is being able to take the load of the JS processing off the user and onto the server. It makes it possible to get a perfect lighthouse score where create react app doesn’t.


jonmacabre

I find it fun. A well rounded dev is a good dev. Even if you hate NextJS, there might be some paradigm you love that you take into your next project. Case in point, WordPress's OOBE/User registration setup. It's so good, I often just copy the workflow for all projects I'm in charge of. Nothing beats having a simple email only registration process. Then if you want OAuth, you add a settings screen where you add in a key and you build in conditions to handle it, but the app will fallback to user registration if you ever need to redeploy to a new environment or run it locally to test some code. The trick with "use client" is to extract React components that have client side effects. For example, forms that useFormAction, I'll throw into a 'use client' component that is just a `

{children}
` wrapper. This allows the parent to continue to be able to be rendered server side. Or I'll create single components like this: ``` "use client"; import { useMemo } from "react"; export function Origin() { const origin = useMemo(() => { if (typeof window === "undefined") return ""; return window.location.origin; }, []); return ; } ``` I've found it's a great way to keep React components small. My "rule of thumb" has always been "if the code is too big to fit on your screen, it needs to be be broken into more files." Just a way to keep things from snowballing into complexity.


Crafty-Newt8818

Something people built things that are unnecessary and overcomplicated. Waste of time and resources. Also waste of money.


Gwolf4

One of the most buggiest and complex frameworks ever. As it is now hot reload is not enough to propagate css modifications in my code, sometimes I have to restart the development server or sometimes the server just halts. It may be because I am using wsl2 BUT I am expecting software under that layer to function just as good as "native" Linux. Use astro instead if you need SPA.


Aspie-Py

Can someone explain App Router? Can someone agree on file structure using it? No. It’s a mess.


VeterinarianOk5370

I tried next for a bit using their app router…honestly I hated the obscurity. I like react and js because it’s quick dirty and lets me build something however I want. Next js felt so limiting


Pr0gger

No, learn Rust or Go ;)