This reminded myself of why I dislike Next.js

I originally made this video to praise next as the king framework, but the caching once again reminded me why I kind of hate next.
-- my courses --
📘 T3 Stack Tutorial: 1017897100294.gumroad.com/l/j...
-- my products --
📖 ProjectPlannerAI: projectplannerai.com
🤖 IconGeneratorAI: icongeneratorai.com/
-- useful links --
💬 Discord: / discord
🔔 Newsletter: newsletter.webdevcody.com/
📁 GitHub: github.com/webdevcody
📺 Twitch: / webdevcody
🤖 Website: webdevcody.com
🐦 Twitter: / webdevcody

Пікірлер: 226

  • @WebDevCody
    @WebDevCody4 ай бұрын

    I was going to title this video “why next.js is still king”, but as I was recording I was reminded about the annoying caching behaviors the developers need to wrap their mind around and decided to change the title 😂.

  • @nastybadger-tn4kl

    @nastybadger-tn4kl

    4 ай бұрын

    I create my own project structure. I will not change even nextjs change. Because i need consistency across my projects i use src/app/dashboard /src/app/frontend

  • @PaulSebastianM

    @PaulSebastianM

    4 ай бұрын

    Still great video.

  • @2dstencil847

    @2dstencil847

    4 ай бұрын

    but isnt if u developed enough static website/SPA, u put cache function to api layer or cloudflare (proxy or gateway level). Why you guy put so many stuff for reinvent the wheel...if u want to replace the wheel and move to Front end layer (to secure your job or increase your job workload)....might as well to architecture the solution well

  • @PaulSebastianM

    @PaulSebastianM

    4 ай бұрын

    @@2dstencil847 I've worked enough to know that there is no silver bullet and no wrong solution. Only tradeoffs. There is no black or white.

  • @leerob
    @leerob4 ай бұрын

    Definitely think we can make caching easier (working on it actively!). A couple thoughts here: - When using Server Components, you don't need to have the Route Handler. You can call that function/Promise directly. Route Handlers are kind of the escape hatch if you're using RSC, only really needed for one off things like listening for webhooks for example. - Route Handlers are unique, and not 1:1 with API Routes from Pages Router, so the mental model has to change a bit. Notably you could also make it a POST, or read anything from the request, and it's dynamic. The use case of trying to return things with a GET is largely replaced by calling that logic directly from the RSC. And if you are like "ah I hate this, I preferred API Routes" - you can still use those! - You said "I think this is the dumbest thing ever [caching Route Handlers], why would they do that?" - the main opportunity here, and a large request from Next.js users of API Routes, was the ability to be able to generate static files programatically, and incrementally update those files. For example, you could have a Route Handler that generates a txt, json, xml file, or similar. And you could generate this during the build process, which means it works when you use a static export which can be hosted anywhere. This is huge for some people!

  • @itsyourboyt4683

    @itsyourboyt4683

    4 ай бұрын

    This is something that I love about the Vercel team is that your team responds back. Keep up the good work Lee

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I guess in regard to many of your points, I’d always expect opt in to caching, but I’ve said my peace 😂 thanks for responding and leaving your suggestions!

  • @serkan_bayram

    @serkan_bayram

    4 ай бұрын

    @@itsyourboyt4683 fr my man is one man army, you can see him in almost every nextjs post :D

  • @neilmerchant2796

    @neilmerchant2796

    4 ай бұрын

    The fact that guys like Lee put so much effort into engaging with the community and addressing peoples' concerns directly is just one reason I'll keep using Next.js as my framework of choice. I don't see any other team, let alone any other CEO, doing anything like this.

  • @rand0mtv660

    @rand0mtv660

    4 ай бұрын

    @@neilmerchant2796 well that is Lee's job after all and he is doing a good job!

  • @tsykin
    @tsykin4 ай бұрын

    Thank you for explaining that in great details! We need more vids like this ❤

  • @thegrumpydeveloper
    @thegrumpydeveloper4 ай бұрын

    I like how similar to tailwind, third parties often give examples of how to work with next or even provide adapters. It’s such a big part of the ecosystem. I can’t say the same of other frameworks. It’s pushing the boundaries and taking feedback from the community.

  • @cntrvsy2905
    @cntrvsy29054 ай бұрын

    The more i look into the general developer space, I can safely say that their two kinds of devs, those who prefer "freedom(optionality)" and those who prefer "opinion" and this widly affects their DX. this has strongly helped me with picking a stack im more comfortable with because once im able to classify a said technology, I can then already predict my DX with it. It is a spectrum obviously on what is "opinionated" and what is "freedom" but generally, I've grown to appreciate technologies that have a clear way this should be handled but if you do choose to deviate from the norm, we can still somewhat accommodate you.

  • @Voidstroyer

    @Voidstroyer

    4 ай бұрын

    I like frameworks that lean more towards the opinionated side as long as it doesn't make the DX tedious. An example of this is with Laravel which is very opinionated, but the DX is quite nice. An example of the opposite is Angular. Still very opinionated but the DX is very tedious.

  • @migueljara9399

    @migueljara9399

    4 ай бұрын

    Exactly my thoughts and why I learnt Flutter

  • @rand0mtv660

    @rand0mtv660

    4 ай бұрын

    The more experience I have, the more I lean towards "built in opinion", but up to a certain point. Angular might be a bit too opinionated for me, but React might be not opinionated enough. I dislike "everything is opinionated" approach because that usually means going outside of the prescribed patterns is hard and frustrating. I guess I would like something in the middle. I like when some things are built in so that they just work better with the framework and are prescribed by the framework. For example, I would love if React had an official styling solution instead of all the css in js abominations we had in the last 10 years. I would also love if it had animation primitives for easy animations so that we don't have to rely on 3rd party solutions most of the time.

  • @alastairtheduke

    @alastairtheduke

    4 ай бұрын

    Yes and there is a learning curve, albeit of a different kind, with each approach. I disliked angular because I hated learning writing something 'the angular way' and was initially attracted to react for that reason. But after so many years, there is definitely a react way to do things now. So react has swung closer to the middle of that spectrum. You still get to chose your meta framework, router, etc and there is a different kind of learning curve there but I prefer this type of learning curve because it feels like I have more control and optionality.

  • @Voidstroyer

    @Voidstroyer

    4 ай бұрын

    @@alastairtheduke Here is how I see it though. An example of a very flexible api would be to just use express. You can then organize the code however you want, however, at some point you will create your own rules about how you will organize everything. So the difference just comes down to whos opinion it is. Some frameworks come with their own opinions, and others require you to make up your own. But sooner or later there will always be an opinion because it helps to make the code either readable, maintainable or both.

  • @edhahaz
    @edhahaz4 ай бұрын

    Going through a lot of use cases, pros and cons. Thanks, quite useful!

  • @PostMeridianLyf
    @PostMeridianLyf4 ай бұрын

    I too use nextjs and sprinkle "use client" everywhere. My favorite features are the app router and the ability to nest the folder tree to accommodate different layouts using "()"in the name of different layout groups. The dynamic tag and image tags are also nice features.

  • @eshw23
    @eshw234 ай бұрын

    For me personally Nextjs 13 has been a godsend. It was so hard to build full stack apps managing and connecting my own server and deploying both parts.

  • @simpingsyndrome

    @simpingsyndrome

    4 ай бұрын

    It soo hard to deploy it, recently i just trying to deploy my project to azure its soooo complecated while in vercel is just a click of a button and hate it

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    What’s hard about deploying it? Just run npm run start and you have a next app working on a vm. Now… if you’re trying to get feature parity, good luck

  • @simpingsyndrome

    @simpingsyndrome

    4 ай бұрын

    @@WebDevCody i use a postgressql for my database and prisma orm, idk what exactly the problem is, but in vercel wether our app is just a static website or dynamic when we deploy it it just work, but on azure there is some kind of like azure function and azure static web app(Image optimization won't work), and i should configured it differently. Recently i found a framework called nitro, that promising zero config on deployment, i think it will solve al the deployment complexity, m considering to contribute to this project, maybe a video for it?

  • @excalibur2417

    @excalibur2417

    4 ай бұрын

    Exactly, combine that with nginx and pm2 and you don't have to worry about it anymore@@WebDevCody

  • @Pete133

    @Pete133

    4 ай бұрын

    @@WebDevCody I'm also working on a next.js site deployed to Azure, and it has been a huge chore learning how to deploy to Azure. AWS and GCP are the same, but my problem with these cloud platforms from giant companies is that they have a million different services and it's so hard to find the right ones. You have to wade through all the marketing material that is often misleading, and most of the time I have to actually try a service before I know how it works(who has time to try all of them?). Then I also had to learn docker, because Azure's Web Apps for Linux with direct code deployment is either incredibly slow to deploy or deploys to a read-only folder which breaks next.js caching. Yes if you already use all these things then maybe you can make it look easy, but I don't know how you make sense of it all when you don't know anything about it and don't have other people to tell you... other than just painfully spending a whole lot of time on it. Even after deciding to use a docker container deployment, Azure has a bunch of different services to deploy containers: Web Apps for Linux (container deployment), Web Apps for Containers, Container Instances, Container Apps, and Kubernetes... not to mention when you google this stuff you often find articles references services that Microsoft has renamed or changed significantly. And then there are a bunch of different ways to set up CI/CD... Github Actions, Azure DevOps/pipelines, azure cli... and some of their docs use one CI/CD method and don't show other methods. It's been such a pain to just figure out what all these different services are.

  • 4 ай бұрын

    You have a nice and concise style of educating. Seems like you didn't know for sure where the video was going until you finished, which is very genuine. - I think the App router was not only published for incremental adoption, but also published incrementally, at the beginning the feature seemed almost experimental, so I think incremental adoption was the only sane move from the team to make. - It's a good thing that you mentioned that Next.js doesn't know handlers in app/api are handlers like any other, unlike in the Pages router, I wasn't aware of the caching issues! - Regarding exporting the revalidate variable from the page, I think that's healthier to achieve with a Cache-Control header because the exported variable is a Next.js feature, while headers are a transferrable web development feature. I've been following and trying out Remix for quite a while, and I'm looking forward to trying it out on a serious project, because I tried like 4-5 different major versions of Next.js and the framework just isn't for me. I feel like Next.js is making decisions for me and telling me not to worry about it, and when something isn't working, I don't know enough to solve it. I'll still work in Next.js projects if I have to, it's the industry standard, after all, but Lee popping up every time someone dislikes Next.js communicates to me a certain insecurity from the team.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I feel like criticism is often responded with a “you just don’t get it” or “just read the docs”, instead of a “hmm maybe this isn’t intuitive”. Every great tool is intuitive. If I need to read tons of docs to use it properly it’s poorly made imo.

  • @BarisPalabiyik
    @BarisPalabiyik4 ай бұрын

    These were great examples to show all of these features. Good thumbnail btw

  • @KPSChannel
    @KPSChannel4 ай бұрын

    I am interested in how Remix pissed you off to switch back to Next, because everything that you showed in the first part of the video is doable in remix as well!

  • @MrTerribleLie
    @MrTerribleLie4 ай бұрын

    SvelteKit. It's all I ever need. No weird pseudo-functionnal programming conventions. No bullshit. Straightforward code.

  • @alastairtheduke
    @alastairtheduke4 ай бұрын

    I have to agree that building with react-query is a joy

  • @drewhjava
    @drewhjava4 ай бұрын

    Next is too focused on the 1% use case. Most people are using this to do dynamic sites.

  • @rand0mtv660

    @rand0mtv660

    4 ай бұрын

    Well that 1% maybe brings them the most money, who knows. I'm quite sure they use telemetry heavily and talk to customers to see what they need to implement. They probably don't go and implement stuff randomly. I of course don't agree with everything they do, but cannot deny that next.js does serve me really well.

  • @drewhjava

    @drewhjava

    4 ай бұрын

    @@rand0mtv660 I mean the whole caching and ISR stuff for public pages is just a Vercel scam anyway. Just put cache-control headers on the pages you want to publicly cache and a stale-while-revalidate header. Why would I need ISR when a proper CDN can do that for me? Whole thing just feels off. This has been a solved problem for some time. Again Vercel is inventing new ways to solve a problem that doesn't exist so you pay for storage.

  • @npf21
    @npf214 ай бұрын

    So to clarify if I was using nextjs with apollo client and graphql for example, puting fetch policy to "no-cache" I would still get it cached by default in nextjs? I feel for the case of projects using graphql fetch policy shouldn't nextjs caching have a way of following the fetch policy in the graphql resolver hook? The edge case for verifying user email with it being cached by nextjs by default if you were doing your own verification does have some concerns for me even if you have graphql fetch policy as "no-cache". From the Vercel company perspective it makes sense to have it default as your potentially saving to make multiple calls from the server at the start of a project's inception. Maybe there will be iterations to incorporate this perhaps

  • @dmt15
    @dmt154 ай бұрын

    Really great walkthrough and explanation. It looks like NextJS has a lot of magic built in

  • @Beyram1501
    @Beyram15014 ай бұрын

    You can't call an api route from a server component, it's the server calling itself

  • @leerob

    @leerob

    4 ай бұрын

    Yeah, this! Since the page is async and can await any promise, you can just call whatever async logic you put in your Route Handler directly inside the Server Component. You don't need the extra network hop.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    But maybe I want a traditional rest api but also want to use RSC?

  • @Beyram1501

    @Beyram1501

    4 ай бұрын

    @@WebDevCody it's a mistake regardless, I stumbled upon it once, there's a nextjs' GitHub issue about this common mistake where they explain in detail why this should never be done. If it's a RSC just call the function directly, the api route should only act as a controller not the whole function

  • @jmarbutt23

    @jmarbutt23

    4 ай бұрын

    This is where I have used TRPC to get around some of these thoughts between server and client calls. It makes it easy to swap between a client and server component. It is minimal changes most of the time

  • @dvillegaspro

    @dvillegaspro

    4 ай бұрын

    @@WebDevCody You can't have both. Just pick the one you want to use and design your app around that. Make a regular javascript API client class to handle your requests and use that in your RSC. Or, if you want client side components, the api route handlers are a great implementation to standardize things that you would normally need a dedicated package like useSWR or react query to do well at a professional level.

  • @returncode0000
    @returncode00004 ай бұрын

    Those concepts makes Next.js currently really hard to dive into. I also find no good documentation about all this weird stuff. That's why I switched to vite for SPAs. Thanks for your video, cleared up a lot of things, great as always! Best React/Next.js YT channel out there 👍

  • @alastairtheduke

    @alastairtheduke

    4 ай бұрын

    I agree, I heard about all these things before, but not until this video did all the options in nextjs make sense finally

  • @damianjanus1990

    @damianjanus1990

    4 ай бұрын

    Now with Remix 2.5 version we have SPA mode :D and it's work on Vite.

  • @zi_t
    @zi_t4 ай бұрын

    Love the video as always. I have a question that has popped up many times: - how do you deal with NextJS’s SSR and UI library like Mantine?

  • @jonny555333

    @jonny555333

    4 ай бұрын

    Mantine should work with SSR without any special configuration. The mantine components should have built-in "use client" so you can use them in server components.

  • @neilmerchant2796

    @neilmerchant2796

    4 ай бұрын

    What jonny555333 said, but also in general anytime you're having an issue with needing client functionality in a server component, just wrap the client-side code in its own component and set 'use client' at the top.

  • @darkestblue91
    @darkestblue914 ай бұрын

    Don't forget Next.js is primarily a static pages generator, not an API builder, so everything is made to save processing, that is why static and caching is always the default.

  • @anonAcc575
    @anonAcc5754 ай бұрын

    Almost didnt notice new video due to custom thumbnail :)

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    👀

  • @gorkemeldeniz9579
    @gorkemeldeniz95794 ай бұрын

    Hi Cody, I am kinda newby about using next. I have a problem with state management on next. Assume that we have a server component and fetch some data in it. How can we store that data for the using all other pages even if these are server or client comps. Server and client components can store same data with state management libs but its feels tricky What do u think about that?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Not sure, probably include a custom component which fetches the data if it’s not set and store it in context or localstorage

  • @achaabni

    @achaabni

    Ай бұрын

    advice : ditch nextjs

  • @tevoj
    @tevoj4 ай бұрын

    Tbh I really think they built the cache sh1t by default to save theirs resources as much as they can (even tho we are paying for this)

  • @magne6049

    @magne6049

    4 ай бұрын

    they're the ones paying for the free tier

  • @krowstormbeats1788
    @krowstormbeats17884 ай бұрын

    What is the theme name in Vscode?

  • @shamshamsham123123
    @shamshamsham1231234 ай бұрын

    Would you be open to doing a video on visiting more modern angular? I wasn't aware you had been in angular before. I'm very curious how you would feel about the direction they've been going.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Maybe one day

  • @DaviMartins99
    @DaviMartins994 ай бұрын

    Hey, Cody, what theme are you using?

  • @KoenVerheyen
    @KoenVerheyen4 ай бұрын

    I guess since Vercel knows they are gonna do most of the hosting, they would prefer some heavier caching by default. If it was purely opt-in devs would forget it in a lot of places with big consequences for their compute capacity.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I’m not sure why that is an issue if vercel charges per usage anyway. I think no matter which way you do caching, people are going to mess it up. Opt out and people accidentally ship bugs that break real users experience because stuff is cached and users don’t see the latest version of data; opt in and websites will be slower and people will complain nextjs is slow (bad for marketing). I personally would rather it be slow and show the right data every single time. One approach is obvious why the website is slow, the other is not obvious why stuff isn’t refreshing until you read their giant documentation about caching and their diagram about how it works.

  • @Goyo_MGC
    @Goyo_MGC4 ай бұрын

    I would have to agree with you on this. It has always been my concern with Next. It sort of is a big machinery with built in magic. You need much time to see why it works a certain way and is a pain if you want to deviate from their idea of how a website should work. It is also one of the main reason I consider more and more using Astro for production project as it have more of an opt-in paradigm. My only concern is with the "lack" of real world project in the space.

  • @alastairtheduke

    @alastairtheduke

    4 ай бұрын

    Yeah, Next.js is a lot more like angular in that way but that's the whole idea behind a metaframework

  • @damianjanus1990

    @damianjanus1990

    4 ай бұрын

    Use Remix instead is awesome!

  • @skyhappy

    @skyhappy

    4 ай бұрын

    Astro is for static websites, not webapps I believe

  • @Goyo_MGC

    @Goyo_MGC

    4 ай бұрын

    @@skyhappy Not really, it does also supports complex patterns

  • @bertrodgers2420
    @bertrodgers24204 ай бұрын

    what colour scheme is this please? Also very, interesting points, will have to consider a fe things

  • @bartekpaczesny508
    @bartekpaczesny5084 ай бұрын

    which icon extension are you using? i've been searching for something like what you have but can't find it :(

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    bearded icons

  • @bartekpaczesny508

    @bartekpaczesny508

    4 ай бұрын

    thanks

  • @somedev1553
    @somedev155321 күн бұрын

    what extension is your block highlighter?

  • @WebDevCody

    @WebDevCody

    21 күн бұрын

    Rainbow indent i thing

  • @abeatrice
    @abeatrice4 ай бұрын

    @webdevcody what glasses frames do you have?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    calvin klein

  • @_the_one_1
    @_the_one_14 ай бұрын

    But have you tried Nuxt? Would love to see you build with it something you already built with Next. I am 100% sure you will be amazed!

  • @AndrewLiu1
    @AndrewLiu14 ай бұрын

    A lot of great tidbits here! were all these info in the docs? or were they all from your experience of "why this is happening?" type of thing?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I think most of it is documented but it doesn't really click until you hit that first "wtf is going on" moment

  • @AndrewLiu1

    @AndrewLiu1

    4 ай бұрын

    @@WebDevCody haha i need to start thinking about its inner workings of whats going on instead of going to chatgpt and posting all my code only to ask it to rewrite it to make it work.

  • @nekotajni394
    @nekotajni3944 ай бұрын

    Am I misunderstanding it but don't you achieve the same result by just typing export const revalidate = 0 ? to make the page not store cache but run dynamically.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Yes that gave multiple ways to make the endpoint dynamic, include export const dynamic = “force-dynamic” or using noStore. Their docs recommend using noStore over exporting the dynamic const. Revalidate = 0 will also work from what I understand.

  • @notfadeaway6617
    @notfadeaway66173 ай бұрын

    so next.js has many options and we need to read the documents carefully? btw,do u use react native for web?

  • @asdougl
    @asdougl4 ай бұрын

    I would assume next js caches by default to save on compute time for vercel

  • @user-lb8to5yr6r
    @user-lb8to5yr6r4 ай бұрын

    The video preview (thumbnail) looks cool! How long did it take you to make it?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    20 minute maybe. I’m trying to get better at gimp and design. And I also just copied the format of another KZreadr which helped

  • @Tyheir
    @Tyheir4 ай бұрын

    Reading through the caching mechanisms fully and thoroughly you’ll get to appreciate the way they’ve done things.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Don’t get me wrong, I appreciate the hard work they or into this; caching isn’t easy, but I’d also appreciate if they let me opt into the complexity when I want it and not always use it by default. A simple next.config setting to default to no caching for anything would be appreciated, then I can add caching to fetch requests, components, or pages as needed. Every app I’ve worked on involves highly dynamic data, so caching isn’t my first go to

  • @Tyheir

    @Tyheir

    4 ай бұрын

    @@WebDevCody yea I would agree opting in would be better as a whole for everyone. I just like how they make things as performant as possible. Bc I bet there’s a really small percentage of non professional next devs that have fully read through the caching docs.

  • @MegaRandompoo
    @MegaRandompoo4 ай бұрын

    Once you understand NextJS by default caches everything, it is a lot easier to understand

  • @Caldaron
    @Caldaron4 ай бұрын

    got something for you: export const dynamic = 'force-dynamic' just figured if you want to cache within those dynamic pages you have to force store them with this: export const fetchCache = 'force-cache' check out the nextjs docs force-dynamic and force-cache, espeically it not caching on force-dynamic is a rather hidden infromation...

  • @alastairtheduke

    @alastairtheduke

    4 ай бұрын

    You just have to tickle nextjs in juuuuust the right way that it likes

  • @seanfilimon
    @seanfilimon4 ай бұрын

    Question Cody what software is in your thumbnail for VFX

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    what is VFX? that background image? that comes directly from the next.js docs

  • @seanfilimon

    @seanfilimon

    4 ай бұрын

    @@WebDevCody ah then they probably used Figma

  • @javascriptes
    @javascriptes3 ай бұрын

    I think that generating your pages as static is a good thing that will save you requests to your db toll.

  • @AlexWebLab
    @AlexWebLab4 ай бұрын

    This video is gold ❤

  • @AlexWebLab

    @AlexWebLab

    4 ай бұрын

    Okay let me give you a little context here. This video is actually giving the most important warning ever about NextJS. The other day I was playing around with Supabase and since I didn’t want to send my key over the browser, I created a server component to fetch the data from a table and then deployed. After few days I’ve deleted the database but my app was still displaying data from the table! WTF?! I was almost blaming Supabase for leaving a zombie database and instead the problem was the caching system of NodeJS!! So that’s why this video is gold and should be mentioned as a warning on EVERY tutorial about NextJS.

  • @luiswebdev8292
    @luiswebdev82924 ай бұрын

    very coo video!

  • @SeibertSwirl
    @SeibertSwirl4 ай бұрын

    Good job babe! 🥰

  • @mtwata
    @mtwata4 ай бұрын

    I remember you said a few videos ago that creating thumbnails for the videos takes time so you don't do it, and I was thinking "it can probably be done quickly enough and would probably get the channel more clicks". But then I thought "who the f am I to say anything, I can barely call myself a programmer, let alone tell someone anything about how he runs his successful KZread channel". So I'm genuinely curious: what made you decide to create one for this video? Is it an experiment? Did you find a quick way to do it and thought it's worth a shot?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I’m experimenting for a bit to see how it does

  • @InfinityFnatic
    @InfinityFnatic4 ай бұрын

    SolidJS is a game changer, I hope everyone ditches Next for it.

  • @fcnealvillangca7943

    @fcnealvillangca7943

    4 ай бұрын

    Does it do ssr?

  • @achaabni

    @achaabni

    Ай бұрын

    I did after seeing next 14 blocking css styles from external components while it was ok in 13

  • @chrisbautistaaa
    @chrisbautistaaa4 ай бұрын

    can you export force dynamic vs noStore

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Yes that works as well

  • @damianjanus1990
    @damianjanus19904 ай бұрын

    It is second video about it on your channel. You test Remix and enjoy it, why not stick to that? Because it's not fancy or not that magic?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Because I already have too many projects in next and I see little benefit to switching. I can just add export dynamic = force-dynamic on all my pages and all my problems would go away 😂

  • @ajzack983
    @ajzack9834 ай бұрын

    How does laravel + react.js sound ? Wanna give it shot ?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I like my typescript

  • @g.c955
    @g.c9554 ай бұрын

    I doubt there's a perfect framework, as long as nextjs can take feedback and keeps improving, it's still the best option for me.

  • @vizunaldth
    @vizunaldth4 ай бұрын

    lol, “if you’re a masochist and don’t want to use react query” 😂 🏆

  • @Hypergraph
    @Hypergraph4 ай бұрын

    after react server actions and long nights of thinkering i decided to leave react/next world unless there is a good reason to use it. i started web dev with django 1.x and after a decade i am returning back to python and django with htmx or equivalent django packages which are very cool. included orm of django, authantication and authorization is much simpler and much powerful, further more admin panel is included in django which is higly customizable by only writing 15-30 lines of code (i don't wanna even mention packages that make it super cool). I'll continue developments in node.js but i don't see any reason to use next.js/react anymore (unless there is a reason).

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Django was nice, but I'm not a fan of dynamic languages anymore. I find typed languages provide a MUCH better developer experience and let you move much faster. But I won't lie, I've seen some django developers code and they can crank out features pretty fast

  • @Hypergraph

    @Hypergraph

    4 ай бұрын

    ​@@WebDevCody i agree typed langs provide better tooling however in django you actually dont need them as much as you need them in typescript. just created a new vs code profile for python / django and it actually works like as i was used to. i don't wanna sound like trying to digress people from their path but i am pretty ok with python auto completions and suggestions in vs code. (btw as you know python has optional types which makes tooling alot better than before.)

  • @iPankBMW
    @iPankBMW4 ай бұрын

    @WebDevCody - You forgot to mention most frustrating thing about caching. About SOFT navigation, the noStore() and none of the other options actually work either...(For the first 30 seconds after entering the page.) they have set RSC payload to be be cached by default for 30 seconds and we as developers doesnt have a change to opt-out of it...

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I decided to ignore that one; I’ve made videos bitching about that already on my channel 😂

  • @iPankBMW

    @iPankBMW

    4 ай бұрын

    @@WebDevCody But you r kinda big now on youtube for them to respond to your opinions. Evn LeeRob are commenting your video :) You have the pover to bitch about things till they fix ;)

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    @@iPankBMW 😂 at the very least they can watch someone else struggle with something they might find intuitive. If I’m struggling with it, I’d bet money others are as well

  • @danrichmond
    @danrichmond4 ай бұрын

    O shit we getting thumbnails now? 😁

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I decided to stop being lazy

  • @danrichmond

    @danrichmond

    4 ай бұрын

    @@WebDevCody at least you have a design eye lol, they already look better then my bro!

  • @RegalWK
    @RegalWK4 ай бұрын

    angular is a framework, and react is a library

  • @tom.watkins
    @tom.watkins4 ай бұрын

    The opt out caching was a horrible decision but otherwise all the new stuff is great. The biggest issue they have now is not so much how it works but how they make it easier (for inexperienced devs especially) to understand. I'm intergrating next as work currently and I dread the day I have to explain this stuff to them. Maybe I'll just send them a link yo your channel instead 😅

  • @danlater
    @danlater4 ай бұрын

    They choose that because nextjs was supposed to be a static website genrator the it evolved to kinda fullstack. What o u think?

  • @muratcemyalin
    @muratcemyalin4 ай бұрын

    i've been making projects in react for 5 years and i was so excited to try out nextjs in my current project and after we were at the halfway of the project nextjs is so irritating that it has lots of downsides so i had to convert all the project to reactjs again. i've never use nextjs again. just use a backend framework for the backend. never try to make a whole project in a single app.

  • @alastairtheduke

    @alastairtheduke

    4 ай бұрын

    the DX of using react-query is just pure joy when compard to this

  • @everythingisfine9988

    @everythingisfine9988

    3 ай бұрын

    I've been thinking about the best way to handle this. Thinking server side for the main landing pages. Server actions for the login. And then reacts query for everything else

  • @azzamismail41
    @azzamismail414 ай бұрын

    This came at a time when I am already frustrated with React after 1 year of learning I still couldnt finish learning the whole ecosystem... then I looked at svelte bcz of all the hype but am now stuck again. I might as well just go full python and ai like this. I hate front end lol

  • @zzkevinlim

    @zzkevinlim

    4 ай бұрын

    python with HTMX can’t go wrong

  • @dwin9402

    @dwin9402

    4 ай бұрын

    LEARN Go, switch to backend/systems. Felt like I became an "engineer" once I learned and used it, it scratched the itch of my curiousity. I was in the same boat but pivoted to remix after learning nextjs for good months, I mean remix was actually good (will continue to use it along with Vite React for UI with Go backend) but seeing how simple and exquisite Go is and its capabilities, my man I was HOOKED. Been playing around cloud/tooling/devops/cli/backend servers with Go for some time now, I think I finally found my niche.

  • @Snoodelz
    @Snoodelz4 ай бұрын

    Great video, opt out caching clearly was a mistake. Hope Vercel listen to this criticism and do something about it.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I doubt it, but we’ll see.

  • @Snoodelz

    @Snoodelz

    4 ай бұрын

    @@WebDevCody The way you explained optionality in depth really hit the point home how it doesn't belong. I'd love to hear what made you go back to nextjs from remix. Still deciding which one to spend my time in with hobby projects 😅

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    @@Snoodelz I have nothing against remix. I’m just so invested in next right now that jumping between remix and next projects slows me down. I know I talk bad about caching in next but I do think next has more features you can opt into compared to remix, and I don’t like remix approach to server actions.

  • @exapsy
    @exapsy4 ай бұрын

    So, ti;dw; - The overwriting of standard stuff like fetch() - Auto-caching which is hard to predict (if im not wrong?)

  • @TheKittko
    @TheKittko4 ай бұрын

    just wanted to quickly give a feedback regarding your new thumbnail style... i don't really enjoy them, they feel really clickbaity now. but i really enjoy your content and hope you'll continue! and if that's what it takes to grow so be it ;)

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Thanks for being a fan!

  • @ndrshn28
    @ndrshn284 ай бұрын

    As an VueJS developer, I just came here to read the comments 😂

  • @amosmachoradevlogs
    @amosmachoradevlogs4 ай бұрын

    Actually at 8:34 you kind of made an error i think you can just do "/api/todos" and next will just figure it out. If I'm not wrong

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Hmm I can try again later but I was getting errors and needed to provide a full path

  • @CheeseStickzZ
    @CheeseStickzZ4 ай бұрын

    I hate both react and next.js with a passion. Whoever thought of porting JS to the back end seriously did not consider how complicated projects can get and how easily you can mess them up when they get really big even if you are using TS.

  • @warlockCommitteeMeeting

    @warlockCommitteeMeeting

    4 ай бұрын

    what do you recommend over next.js for a react project?

  • @crazycode2578
    @crazycode25784 ай бұрын

    Iove how nextjs use cached

  • @yohance6904
    @yohance69044 ай бұрын

    Particular Next.js behaviors might seem annoying, but long as one goes through the docs (their "Learn" course is very thorough) you'll be fine and won't fall into one of their annoying behaviors :p

  • @alastairtheduke
    @alastairtheduke4 ай бұрын

    You should have titled this video "You'll learn more about nextjs than any other video"

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    🤣

  • @Sledgeattack
    @Sledgeattack4 ай бұрын

    Problem with Angular's "batteries included" approach is just that, low optionality, one bad apple spoils the bunch. I deliberately do not use *ANY* Angular features that returns observables because RxJS is just a nightmare and it's almost inescapable. Hopefully Angular will see a new day with signals but idk.

  • @colinb8332

    @colinb8332

    4 ай бұрын

    Rxjs is not a nightmare. It can be hard to understand at first, but once you understand the fundamentals it’s a powerful tool that lets you get fine grained control of your data flow.

  • @Mego4884

    @Mego4884

    4 ай бұрын

    @@colinb8332 exactly.. RxJS is the biggest advantage if you can use it properly

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I have angular because of rsjx. Over engineering at its finest.

  • @lucas-barake

    @lucas-barake

    4 ай бұрын

    ​@@colinb8332RxJS is overkill for 99% of applications. It has very specific use cases, but defaulting to RxJS for the most mundane tasks is just insane.

  • @zerefdev
    @zerefdev4 ай бұрын

    why are you using fetch inside your rsc to call your own server?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I was making a point not showing you how next could should be written

  • @gilneyn.mathias1134
    @gilneyn.mathias11344 ай бұрын

    Having too many options is as bad as having NONE.

  • @rumble1925
    @rumble19252 ай бұрын

    Been playing around with v14 and having a mish mash of server and client components seems like it's going to be a nightmare in a big project. Data fetching happening deep down in the component hierarchy in order to get suspensed components... React just by itself is hard to debug and prone to spaghetti since they introduced hooks, now this... I don't know, foreseeing a big industry migration away from this. I'm not the only one tired of having to relearn the framework every 6 months because the new version solves problems that don't exist in 99.9% of apps.

  • @ngetichishmael
    @ngetichishmael4 ай бұрын

    **Pun Intended** There are only two kinds of languages: the ones people complain about and the ones nobody uses. Bjarne Stroustrup, The C++ Creator

  • @serkan_bayram
    @serkan_bayram4 ай бұрын

    it's totally tiring to debug code for two hours to see it's cached and you are not insane. I wish there was an easy indicator that shows something like "this content is cached"

  • @bshelling8922
    @bshelling89224 ай бұрын

    The problem with the React/JS community, it's so opinionated there isn't true best practice and everyone wants to be right, then change their minds every hour of the day lol.

  • @GabrielMartinez-ez9ue
    @GabrielMartinez-ez9ue4 ай бұрын

    I gave up with nextjs. I switched to rails to power up my startup.

  • @stupeyca
    @stupeyca4 ай бұрын

    Nice thumbnail! And yeah, agreed. I keep coming back to React. I'm now trying out Go and it kinda feels the same, I think. Or at least the community seems to be like that.

  • @begris
    @begris4 ай бұрын

    sometimes this unstable_* functions have weird behaviors on production, I guess that's why they're unstable

  • @PaulSebastianM
    @PaulSebastianM4 ай бұрын

    The forced caching problem looks like they defaulted to SSG instead of SSR.

  • @AndersGustafsson87
    @AndersGustafsson874 ай бұрын

    You have some valid points, but frankly, to me, your issues looks mostly like knowledge gaps

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    That argument can be made for anything that feels complicated. “Skills issue” isn’t the right response when valid criticism is given for a library or framework; maybe the framework is just a bit too complex?

  • @lasso01
    @lasso014 ай бұрын

    I've tried starting my projects in Nuxt3 many times, but I always end up going back to React and Next, primarily because their ecosystem is so robust. In every project, there seems to be at least one essential package for which only a React SDK is available :(

  • @user-ul2ik5xz7i

    @user-ul2ik5xz7i

    4 ай бұрын

    Is there any function that NEXT can accomplish that NUXT can't?

  • @user-dx4ux5um5w
    @user-dx4ux5um5w4 ай бұрын

    I think the app router it is kind of a mess, I don't really like it, it causes packages error. etc, I've tried many times, but sitll end up using pages router. Please Nextjs if you see this focus on the pages router add more features to it just like App router has. I love using nextjs I don't want to move to other framework😥😥

  • @fullstack_journey
    @fullstack_journey4 ай бұрын

    Remix >

  • @damianjanus1990

    @damianjanus1990

    4 ай бұрын

    All the way!

  • @mayanksharma6927
    @mayanksharma69274 ай бұрын

    Page router is still the king

  • @shrek22
    @shrek224 ай бұрын

    did he go over why he doesnt like sveltekit?

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Sveltekit is good, I just use next because it’s what I already know and all my projects are already in it

  • @Applecitylightkiwi
    @Applecitylightkiwi4 ай бұрын

    Next js a weird mvc pattern i call CBA, content based arch, its a mess in my opinion, eventhough i like it a lot and im still discovering next js, i wish it was better

  • @bgarcesch
    @bgarcesch4 ай бұрын

    Great and informative video, like always. I do have to say I'm less than impressed by the thumbnail. It feels a bit clickbaity and reminds me of the ones from another tech youtuber that seems to only do that.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I copied Josh tried coding and asked him for feedback

  • @blessedonekobo
    @blessedonekobo4 ай бұрын

    This is unfortunate. I was looking forward to experimenting with RSC with Next but opt-out caching is a HUGE footgun. I guess I'll have to wait for other RSC implementations

  • @deezwhat2791
    @deezwhat27914 ай бұрын

    I love nextjs but the complexity they adding in every new update is pretty confusing to me

  • @Daddyjs
    @Daddyjs4 ай бұрын

    Sad you have such a nialistic mide set about next js. I understand your sentiment however next js is the tip of the spear among all javascript frameworks. If you are weary about learning and staying up todate with new tech and practices then just use html css and javascript

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    if people don’t complain, how will stuff improve?

  • @Daddyjs

    @Daddyjs

    4 ай бұрын

    @@WebDevCody makes sense. Your video is very informative

  • @magne6049
    @magne60494 ай бұрын

    Vike has even more optionality than Next.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Yes I’d agree with that, but vite is just the plugin and build tool, not the framework. You’d have to compare next to nuxt

  • @magne6049

    @magne6049

    4 ай бұрын

    @@WebDevCodynot Vite, but Vike which is a Vite plugin that replicates NextJS.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    @@magne6049 oh interesting I’ll have to look into it

  • @FlorinPop
    @FlorinPop4 ай бұрын

    New thumbnail, who dis

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    Trying to play the yt game a bit more 😂

  • @MungeParty
    @MungeParty4 ай бұрын

    I feel like you're overstating your point by saying that it's not a good framework when the only things that you dont like are the default caching settings.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    And that’s the beautiful thing about opinions

  • @Patinhow100
    @Patinhow1004 ай бұрын

    20 minutes Just to say that you dont like the cache by default. Well, i agree that this needs to need off by default, but dont use NextJs jus because of it? Makes no sense to me. And some things there you just don't understand how to use.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I mean the video was more to explain how next does things pretty nice for the most part and it is a walkthrough explaining some main concepts. If you wanted me to say I don’t like caching on by default my video could have been a tweet, but that’s not how KZread works 😉 also I never said don’t use next. I literally said I keep coming back to next because it’s the best option imo. Absolutely there are things I don’t 100% understand about next, but that’s also the point. Nothing is very straight forward and that leads to a bad DX.

  • @Patinhow100

    @Patinhow100

    4 ай бұрын

    @@WebDevCody Maybe the title of the video and the purpose of it don't match with what you are trying to pass. But it's like you said, it's how youtube works. Thanks for the attention.

  • @sogzful
    @sogzful4 ай бұрын

    RAM

  • @tobychidi
    @tobychidi4 ай бұрын

    Switch to Nuxt and enjoy life.

  • @Nellak2011
    @Nellak20114 ай бұрын

    What are you talking about? This is so minor. If you really need something dynamic just add in 2 lines. I don't get what the big deal is. You can't just say the whole framework is garbage because of this.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I did start the video praising next and saying I always end up using next because it’s the best option.

  • @luizgrocco
    @luizgrocco4 ай бұрын

    I have to say that criticizing all the default caches is understandable because they have a decent learn curve and you have to read through the docs thoroughly to understand them all. Having said that it is my opinion that it's better to force devs to "fix the cache bug" (not a bug, just your skill issue), than letting thousands of unoptimized NextJS projects all exist without any caching solution. If this was a library, I am 100% for cache being "opt-in", but since this is supposed to be a complete framework which is highly opinionated, I think that caching by default is reasonable. So I will pull a Primeagen here and call this a "skill issue" for anyone that refuses to learn the framework properly and opt out of the 3 different caches implemented by the framework when necessary. I know it is a controversial opinion, so flame me.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    I would agree if it were not for the fact that these caching issues WILL affect your users. But yes, learn how to use Next.js and it won't be an issue; that argument can literally be applied to anything, but it doesn't negate the fact that it's still a real issue for many. I literally have code deployed right now using next that never updates because I set the cache to 24 hours and for some reason Vercel just doesn't update the page. I had to change the cache down to 1 hour to get vercel to actually re-compute the page. These are reall issues that real devs struggle understanding, and if the hosting company who made next.js can't get it right, why would we?

  • @luizgrocco

    @luizgrocco

    4 ай бұрын

    @@WebDevCody that case is inexcusable indeed, they should get it right before advertising it as a product. I know it's not your case, but I feel like way too many people want to make value judgements about frameworks and libraries without fully understanding them, and that sometimes frustrates me. The day I made this comment was of them. I apologize if I came across too harsh.

  • @WebDevCody

    @WebDevCody

    4 ай бұрын

    @@luizgrocco I just like to complain when I’ve wasted an hour developing because of simple mistakes, and my complaining generates views. 😂 no worries thanks for the comment.