Totally understand your point, more often than not, the best language / framework is simply the one you're most familiar with. When it comes to actually finishing a project, the more I find myself looking for stuff on how to do X in Y, the more likely I'll never finish it.
Love that you expanded your thoughts on this. I use Nextjs for the ecosystem. Saves me so much time to use other libraries and so many resources already available. Lol at the last part. I like that you're honest. That's why I keep coming back.
I'm a go backend dev. I've been toying with next lately and I think it is a great experience. Compare to a SPA, I think next simplified a lot of thing.
nextjs actually has limitations and rules and that means more freedom paradoxically. with anything, if you're too free, you don't know where to go or what to do. nextjs actually gives you abstract structures for your apps that's much more cohesive and that results in things like better community and better understanding of websites which use nextjs
That's the thing. The grass is always greener on the other side. If you know a stack and are familiar with it and can achieve most of the stuff you want to do, just stick wit it. (It is what I have figured out re-writing the same project 3 times xD)
Yeah, on the surface things seem better, but inevitably after some time when building a proper application, you run into roadblocks, edge cases or just have to implement something in a worse way compared to what you are used to. Of course other frameworks or even languages can provide some benefits over your current stack, but that doesn't mean everything is better or worse. As with everything in programming, it depends and there are tradeoffs with each thing you use.
Ive been using rust, htmx, and tailwind once i got used to it, its not that bad. I can practice learning rust as I go while building fun projects after years of react
8:12 this is the part that I like about Next.js, these options. I usually build apps behind authentication, so mostly dashboard like apps. I do not require SSR usually, but there were cases where after some time the project required SSR for some public pages or just some static public pages. I cannot do that with react-router for example because it doesn't build static pages to HTML. Yeah I could build them as a separate project with some static HTML, but that means the design system of the project would have to be re-implemented and it would have to be a separate project. I usually see people say "Why use Next.js if you don't need SSR", but the thing is I don't know if I'll need SSR in 6-12 months. At least if I'll require it I can easily use it, if I don't require it, it just doesn't matter and I develop as usual. And that's not mentioning Image component, font handling to prevent layout shifts, Script component, lazy loading components etc. Next.js provides a bunch of stuff beyond just SSR or basic rendering of React. There are of course things I dislike, but overall I do still like it.
python/PHP not having a type ecosystem as developed as the Typescript one is deal breaker for me. Kinda hard to go back to dynamic types when I got so comfortable with the static ones. Great video Cody!
We use django at work and serving html with it is horrible. I really do not understand how people manage to use it. With the job I get pycharm professional as well and still sucks, it doesn't provide intellisense when working with django's templates. Cody is right in that you will always need javascript when working with traditional MVC frameworks. What you end up doing is just making your own crappy javascript framework on top of whatever framework's templating language you're using. Why go through that when you can just use a full stack front end solution like next and query the framework api for the edge cases? The only framework that works is spring and that's because they allow you to serve react 😂
@@TheSuperBoyProject well many frameworks use inertia js which lets you serve react or vue from the backend, but at that point your team has to juggle two ecosystems and languages. It’s nice just needing only typescript.
If anyone is just starting off, i would definitely suggest trying the laravel ecosystem. It is so full and well documented. You would find it relatively easy to pickup
for me its just the community built around it. its awesome that you can just search for your problem and there will be a provided solution in the ecosystem
Maybe you can do a meta-frameworks comparison list, I think it will be very interesting for viewers. For me personaly, in the past years, there was not alot of job where we use raw React or Vue, most of the tasks are Static or Hybrid Rendered Headless app, where meta-frameworks are super handy.
How do you deal with the fact that you can't cancel the request for server actions? (if you ever encounter a situation where you need it) I tend to keep tRPC in my next.js projects just in case I need to abort requests to the backend from time to time, because the vanilla workaround is making a route and fetching that route. I like tRPC but I rather replace it completely with actions and the fact that we can't still abort server actions is bothering me a bit.
When would you want to abort an action? If an action runs long enough that a user has time to cancel or abort, it sounds like you should use a async type of endpoint?
@@WebDevCody I have been using actions for data loading in client components for some time. And I had few cases where I would need to revalidate data on a websocket event and sometimes I would receive one while I am refetching the data already. I know it’s kinda an abuse of server actions, but It’s very convenient.
I would love to see kill switch implmentation in nextjs. Let's say my client is a technical person, he can remove the the code but is there any other way?
After laravel you should give vue/nuxt a try. Especially nuxt. I like the way of auto imports. When I'm working with it, I'm just resting. It feels like that
nust is solid, it falls under the same paradigm of nextjs or other meta frameworks. I kind of don't like vue personally that has nothing to do with performance or community, it is just that I like jsx a lot. But everytime I look at nuxt with amazing features and devtools, it seduces me so to say 😅
@@neociber24 Hmm, I've never had this issue about that I don't know where things are coming from. Because auto imported components' names are based on path directory and filename. So you actually see the whole path to a component when it's used in template. Or maybe I just got used to it so I understand it right away. And auto imported composables come from composables directory. Idk, I find it nicer than like I had in nextjs 20-30 lines of just imports 😀
@@raiyansarker Yeah, devtools it's something. As for jsx - it's opposite for me😄When I have to work with react at work, I'm like - oh, man, how's it even exist and people use it, it's so unconvenient to me😀
Live_view already have an example of trello but we still use js but we can build some application without the need for writing js. And live_view it is not like hot-wire or live-wire we need to consider that it is a websocket we do not stablish new http connection and deal with the overhead of middlewares
I end up making everything client side with next, I'm a noob but almost all my errors and problems come from server side stuff that I don't even need. Maybe I don't know what I don't know.
I don't love (or hate) most the arguments above. I could be wrong but Next and React seem to be front-end-first tools, with build-step accessories bolted on to make them do SSR. Am I wrong? To me, it seems clear that web dev is moving all the way back to full SSR-all-day-every-day. The good'ole days when secrets were safe and pages always rendered fast 🙂I love the speed/simplicity of doing SSR with Hono JS and simple JSX templates. Some Htmx sprinkles here and there as needed. My data layer is already "server actions" OOB w/o any extra tooling or building needed 🙂
Hi Cody, how would you start learning Next JS if you would decide to do it RIGHT NOW? Maybe starting from their tutorial from their website first? I see you have a course on your website as well, but it's not updated to Next JS v.15
Nextjs 15 isn't stable yet so no one is gonna make a course about it now as a lot of things can change in the future so learn from the old courses , the new version doesn't to have a lot of breaking changes any way
@@theodordumitrache-z7d I think i would take the codevlution nextjs course as it covers most of the things then go and a pick an orm like prisma then and a database and build full stack apps .
For me, I use nextjs as a hobby and use angular professionally. What I like the most is the constant new updates and new features. I understand some see that as bad, especially when the new features has some bug. However as a hobbyist nextjs, using new features are fun! One thing that is still hard to grasp is its default cache . As of now, I’m trying to understand how I can use React Query Cache and Nextjs cache….. yes it’s complicated
Cody what's the easiest way to migrate a big MERN project which is using commonJS to ESM. I tried it once but not every module supporting that in my project. I want to use langchain and openAI in my project and its using ESM.
Sunk cost fallacy is the reluctance to abandon something despite the abandonment being beneficial. In this case abandoning Next or React probably wouldn’t be beneficial for you so it doesn’t meet that definition.
nextJs is the indusrtry standard for backend for frontend framewaork, however nextJs is still behind when it comes to tooling for a backend that talks to the database!
Your arguments make sense, but they're especially good because of the context you mention. It's quite rare for people to defend things but concede that there might be biais in their thinking-which is a shame, because, here, it makes your arguments much stronger, and it builds more goodwill. Of all that you've said, React having paid the bills for years is probably the one that resonated with me the most. And I don't know that the sunk cost fallacy really is a fallacy here. If you've spent years building skills, that's a cost, which you no longer have to pay, but which you would absolutely have to pay to use something else. So the more you know something, the less attractive other options become, regardless of their "objective" or "out-of-context" or "absolute" qualities. Of course you can start assessing whether the alternative's benefits outweigh this cost, but I don't think switching to something similar to Next.js like Laravel would be useful enough to justify the cost.
Yeah like I mentioned on X, if a new technology comes out, it has to at least make me 20-40% more productive for me to consider investing the time to switching. Turns out most of these alternative approaches provide little gain imo
might be interesting to create 2 same projects with different frameworks to see, if nextjs video would be more popular with views than other stack. but who wants to create 2 same apps with different techs :D
People are feeling next and the whole react ecosystem is overcomplicated now so they are switching to alternatives but In my opinion providing the same ux and make large softwares I think nothing beats react ecosystem.
Adopting a framework, any framework, means embracing the 1000s of decisions that went into designing and implementing that framework. This is almost always better than spending time trying to re-invent everything the framework authors created. Once mastered, the advantages of switching frameworks have to be significant to justify the effort it will take to switch and re-learn from the ground up all the decisions the new framework authors baked into it. NextJs/React is my choice in frontend UI. Spring Framework is my choice as a backend API server. Its very unlikely I'll switch to anything else for years.
Next js is not fully compatible with bun because nextjs uses some very obscure/unpopular Node APIs that Bun hasn't yet implemented. That's why I go with Vinxi + tRPC + tanstack router. It's vanilla JavaScript, it will run everywhere
Do you maintain a large next.js codebase or you just run tutorials? Because you seem to be jumping across frameworks everyday. It's different if you had a large pages project and now they're pushing app router with a completely different design and you have to rewrite a lot.
After moving away from php I went all in on js and Next with ts. I’m tempted to learn all these others but then I have to ask why? I really like Next. On the other hand, keep in mind that a jack of all trades is a master of none.
If you are using React, Next is probably one of the best option. But imagine a world where Next wasn't build on react. It would have been even better lol Imagine it was built on HTMX!! 🐴 The best world
@jikaikas I worked with Python and Django for years before I even got in Next.js and node.js and Python is a great clean language Django is a clean stable proven framework👌
Next is hard. It loads 4mbs of js to run anything, suspense is broken for me and at the end of the day all the cool features are so hard to actually use you are at best shipping a laravel equivalent... skill issue
Right I was looking in dev mode (stupid). In prod it's way under a meg. Suspense wrapping a server component that's fetching data is still broken (won't show the fallback) and caching is also broken (won't revalidate after revalidatetags was called, even when including the tag in the fetch request)...
@@edhahaz None of that is broken. All features that I and thousands use on a daily basis and if you are having issues you are prob doing something wrong and need to ask for help. A very normal part of dev
Great video. I am just a team React. I predominantly use Next Js, Remix, or Astro if I need something static, and for content management, I use Strapi.
As someone who's been coding for a year and has almost exclusively done so with react/NextJS I gotta say.. I chose poorly. Laravel is simply better. Even with react on the front end laravel is a much better solution. Yeah you need to learn php but if you go with inertia+react on the front end you're not wasting your react knowledge and learning the laravel back-end infrastructure is surprisingly easy (mostly because their documentation is actually good) .
@@brandon-t7s I think they meant that vercel pushes the deployment of your next.js apps to their own platform. They make it stupidly easy to deploy there. On the other hand, I've read people having trouble deploying anywhere else. Personally, I've only deployed free apps to vercel, and have yet to try other platforms to test that claim.
@@WebDevCody SolidJs syntax is like React but it is super easy to write due to its built-in signals and context for client side state management. Great DX. It runs super fast with small build bundle size. No re-rendering hell.
I hold to my words drizzle it is not the right choice to use it lacks alot of features maybe if your app is simple crud app but newer software need to deal with geolocation data or other stuff that you need to read the drizzle docs to implement the types yourself and other stuff
@@MarkDeibert Prisma have same issue and sometimes worse than drizzle for now i enjoy using Kysely yes it is not an orm but it is better than drizzle and prisma and you could have codegen and you will have a typesafish queries better than others
This sounds like a typescript skill issue and has nothing to do with ORM or whatever tools, as you expected ORM to do something that aren't intended to have, as in general SQL database there is not such a "specific structure type" for JSON or object. You need to specifically handle those by yourself. Technically speaking though, it's not even a skill issue, Geo data typescript is very complex. It's how it's. At the end of the day, if the data is coming from trust source and you don't want to validate the geojson/geolocation structure due to performance issue, and just want to render it, blank if the structure is broken, then hard cast "data as Geolocation" or "as GeoJSON....." is all you need. And make sure to have "Partial" to help you guard against the undefined bug if you don't want to validate those geo data beforehand. Your problem is essentially a runtime thing, and you need to take the tradeoff by yourself. Whether you do the runtime validation (which could be terribly slow because geo data tends to be very huge with tons of different keys and complex structures). Then all your typescript after that is good to go. Or you don't do validation and direct run through it if the end result allows you to do that, then define the typescript and make all the key optional. Source: myself. Have to write function to process geojson data, convert some old javascript functions to typescript (originally "any" is used everywhere), catch many undefined bugs from those geo transform functions alone the way, need to check its data structure carefully and manually, recursion check etc. interact with 3rd party libs like D3 when typescript is all enabled for all of them. One key takeaway is if you decided not to validate the structure make all the key optional is your best safe bet. When a typescript object is typically complex and very dynamic like text content object structure in rich text editor, or Geo data, nothing can save you other than yourself.
If we really want to honest about this topic. There are 2 "influencers" that cause a lot confusion in this space, an Ex-Netflix and Ex-Twitch employee.
I don’t think I’ve seen theo deviate from react or next, so not sure what confusion you’re referring to? Prime just hits on every topic and backend language it seems. I think he just enjoys learning about languages
7 หลายเดือนก่อน
IMO Next.js is meant to be used by .01% of web apps that require advanced control of caching, ISR, SSR, etc, most web sites can be successful with WordPress or astro.js with solid.js or react and that is, happy days. The problem is that many devs know about next.js cause they make lots of noise 🙄
But just because it has that many features does not mean you HAVE to use them. But it gives you the option to do so if you need to. I agree that most apps are static or simple SPAs but you can still do tht with Next. Now imagine you are working on a simple site and in the middle some requirements change. You will have to add a server, some type of cache or any of the many things that next already offers - which will be a hastle in most casses. Instead, with Next you can just use more of its features and be done with it. And ofc now there are more and more technologies adapting such features, but still, there is a reason why even the React docs now recommend starting any react project with Next
On your first point, I dont see why you wouldnt move around and learn other frameworks regardless of having the most knowledge in next/react/js. As it would just be an enrichment of knowledge and skills instead of a complete turn around. I use virtually anything I can get my hands on, as long as I understand and enjoy what im doing using a framework really doesn't matter at all. I think the entire community and the modern day developers just pidgeon hole themselves into 1 little nook and stay there fearful of anything that isn't "their thing".
Nextjs is a resource hog and will easily consumer 4GB+ of memory for a simple dev server. It's also slow, where links can take like 10 seconds to load and it's not the backend it's waiting for. I switched to Remix out of pure frustration/desperation because at least I'd stay in React, and to my complete surprise, no more memory or performance issues, and feels so much more lightweight. Feels like how fast an SPA is supposed to be. Never going to use Nextjs again and won't ever recommend it to anyone
Next.js got complicated when vercel started hiring more folks to over-engineer the product. The average next.js project doesn't have a well defined structure hence most projects are a pile npm package concoction. Almost every next.js codebase has a different structure and code architecture, and most of them are done bad. With that said, most other framework are worst
Funny watching copilot trying to write its own list lol. Kind of goes to show how much LLMs still lack high level, opinionated thoughts around software engineering. They are great tools, but just a tool. Nowhere near yet replacing human engineers.
To be fair to the LLM it didn't really have any great context to go off on. Still takes a human to setup these models for success and validation is my point.
You are selling Laravel without intending it... Let's be honest, JS ecosystem is broken, instead of having a community helping you to solve common problems, you've a community trying to sell you services SaS.
They listened to feedback and they are reverting bunch of those fetch and caching defaults. And what he said is right. You could have upgraded to Next 13 or 14 without ever touching the App Router and just continued to use Pages Router. When they do breaking changes, they really aren't a chore to implement in a codebase and new features introduced are usually incrementally adoptable and opt-in. Most of the time you really aren't forced to use something new in Next or React.
Theres a dev out there getting more work done and making more money. They don’t waste time debating tools and frameworks.
I like how the Co-Pilot has its own opinion about Next while you're talking, Cody. It's so silly. 🤣
"next.js is great" that's all the reason I need to convince my boss why we should adopt next. Thanks copilot!! 😆
It distracts me
Love the transparency, especially on the last part.
I like that you're able to stay focused and not get distracted by the copilot's suggestions. lol
😆
Good video. I like remix a little more. But the market for Next is there. And I do enjoy some server actions.
Totally understand your point, more often than not, the best language / framework is simply the one you're most familiar with.
When it comes to actually finishing a project, the more I find myself looking for stuff on how to do X in Y, the more likely I'll never finish it.
Love that you expanded your thoughts on this. I use Nextjs for the ecosystem. Saves me so much time to use other libraries and so many resources already available.
Lol at the last part. I like that you're honest. That's why I keep coming back.
I’m just keeping it real man
I'm a go backend dev. I've been toying with next lately and I think it is a great experience. Compare to a SPA, I think next simplified a lot of thing.
nextjs actually has limitations and rules and that means more freedom paradoxically. with anything, if you're too free, you don't know where to go or what to do. nextjs actually gives you abstract structures for your apps that's much more cohesive and that results in things like better community and better understanding of websites which use nextjs
Larvel + Intertia seems promising. Full React front-end. Not sure if you've tried it before.
That's the thing. The grass is always greener on the other side. If you know a stack and are familiar with it and can achieve most of the stuff you want to do, just stick wit it. (It is what I have figured out re-writing the same project 3 times xD)
Yeah, on the surface things seem better, but inevitably after some time when building a proper application, you run into roadblocks, edge cases or just have to implement something in a worse way compared to what you are used to. Of course other frameworks or even languages can provide some benefits over your current stack, but that doesn't mean everything is better or worse. As with everything in programming, it depends and there are tradeoffs with each thing you use.
@@rand0mtv660 spot on!
That's mostly true. But sometimes you make a bad first choice and need to move to something better
that wasn't the whole point of the saga
Ive been using rust, htmx, and tailwind once i got used to it, its not that bad. I can practice learning rust as I go while building fun projects after years of react
8:12 this is the part that I like about Next.js, these options. I usually build apps behind authentication, so mostly dashboard like apps. I do not require SSR usually, but there were cases where after some time the project required SSR for some public pages or just some static public pages. I cannot do that with react-router for example because it doesn't build static pages to HTML. Yeah I could build them as a separate project with some static HTML, but that means the design system of the project would have to be re-implemented and it would have to be a separate project.
I usually see people say "Why use Next.js if you don't need SSR", but the thing is I don't know if I'll need SSR in 6-12 months. At least if I'll require it I can easily use it, if I don't require it, it just doesn't matter and I develop as usual. And that's not mentioning Image component, font handling to prevent layout shifts, Script component, lazy loading components etc. Next.js provides a bunch of stuff beyond just SSR or basic rendering of React.
There are of course things I dislike, but overall I do still like it.
Good points. Personally my biggest gripe is the client side caching, but it seems they are going to fix that in the upcoming version 15
python/PHP not having a type ecosystem as developed as the Typescript one is deal breaker for me.
Kinda hard to go back to dynamic types when I got so comfortable with the static ones.
Great video Cody!
Yeah I never want dynamic type again personally
We use django at work and serving html with it is horrible. I really do not understand how people manage to use it. With the job I get pycharm professional as well and still sucks, it doesn't provide intellisense when working with django's templates.
Cody is right in that you will always need javascript when working with traditional MVC frameworks. What you end up doing is just making your own crappy javascript framework on top of whatever framework's templating language you're using. Why go through that when you can just use a full stack front end solution like next and query the framework api for the edge cases?
The only framework that works is spring and that's because they allow you to serve react 😂
@@TheSuperBoyProject well many frameworks use inertia js which lets you serve react or vue from the backend, but at that point your team has to juggle two ecosystems and languages. It’s nice just needing only typescript.
The longer your beard is the wiser you become
If anyone is just starting off, i would definitely suggest trying the laravel ecosystem. It is so full and well documented. You would find it relatively easy to pickup
For small projects Hono + prisma and next frontend
But as soon as i wanna build the backend better, i go back to spring boot
Same, spring boot is really good and easy to use.
for me its just the community built around it. its awesome that you can just search for your problem and there will be a provided solution in the ecosystem
What happened to your journey with remix? Was curious to try it out
what you think about remixJs ?
Good job babe! You’re brave to state your opinion in this heated climate lol😅 yall stress me outtttt
we all moving to jquery with this one 🔥
Don't worry about the copium. Everyone on all sides are huffing it. Most just don't want to admit.
Maybe you can do a meta-frameworks comparison list, I think it will be very interesting for viewers.
For me personaly, in the past years, there was not alot of job where we use raw React or Vue, most of the tasks are Static or Hybrid Rendered Headless app, where meta-frameworks are super handy.
How do you deal with the fact that you can't cancel the request for server actions? (if you ever encounter a situation where you need it)
I tend to keep tRPC in my next.js projects just in case I need to abort requests to the backend from time to time, because the vanilla workaround is making a route and fetching that route. I like tRPC but I rather replace it completely with actions and the fact that we can't still abort server actions is bothering me a bit.
When would you want to abort an action? If an action runs long enough that a user has time to cancel or abort, it sounds like you should use a async type of endpoint?
@@WebDevCody I have been using actions for data loading in client components for some time. And I had few cases where I would need to revalidate data on a websocket event and sometimes I would receive one while I am refetching the data already. I know it’s kinda an abuse of server actions, but It’s very convenient.
I just started using nextjs. So far I like it.
I use Laravel + React with Inertia, it’s simple especially if you’re coming from a JS environment 😊
I would love to see kill switch implmentation in nextjs. Let's say my client is a technical person, he can remove the the code but is there any other way?
After laravel you should give vue/nuxt a try. Especially nuxt. I like the way of auto imports. When I'm working with it, I'm just resting. It feels like that
Nuxt looks incredible, but I don't like auto imports though, it's hard to read code and don't know where things are coming from
His old videos are literally all Vue.
nust is solid, it falls under the same paradigm of nextjs or other meta frameworks. I kind of don't like vue personally that has nothing to do with performance or community, it is just that I like jsx a lot. But everytime I look at nuxt with amazing features and devtools, it seduces me so to say 😅
@@neociber24 Hmm, I've never had this issue about that I don't know where things are coming from. Because auto imported components' names are based on path directory and filename. So you actually see the whole path to a component when it's used in template. Or maybe I just got used to it so I understand it right away. And auto imported composables come from composables directory. Idk, I find it nicer than like I had in nextjs 20-30 lines of just imports 😀
@@raiyansarker Yeah, devtools it's something. As for jsx - it's opposite for me😄When I have to work with react at work, I'm like - oh, man, how's it even exist and people use it, it's so unconvenient to me😀
Totally agree on types. I tried quite a few different languages, couldn't really stick with dynamically typed no matter how good ecosystem is
Can you do more coding challanges for juniors (or any level) its very informative and educational seeing you complete those challanges
Live_view already have an example of trello but we still use js but we can build some application without the need for writing js.
And live_view it is not like hot-wire or live-wire we need to consider that it is a websocket we do not stablish new http connection and deal with the overhead of middlewares
Also, isnt all js at the end? So learning wouldnt be too much of an issue
I end up making everything client side with next, I'm a noob but almost all my errors and problems come from server side stuff that I don't even need. Maybe I don't know what I don't know.
Though am not a big fan of Nextjs, am currently building a project in it on the frontend and Golang for the backend
I just do Laravel/Django(session auth) + Vue (No SPA) I don't need SEO and this setup serves my corporate clients well.
I don't love (or hate) most the arguments above. I could be wrong but Next and React seem to be front-end-first tools, with build-step accessories bolted on to make them do SSR. Am I wrong? To me, it seems clear that web dev is moving all the way back to full SSR-all-day-every-day. The good'ole days when secrets were safe and pages always rendered fast 🙂I love the speed/simplicity of doing SSR with Hono JS and simple JSX templates. Some Htmx sprinkles here and there as needed. My data layer is already "server actions" OOB w/o any extra tooling or building needed 🙂
Even if you use trpc you can still expose endpoints, although not that straightforward.
Hi Cody, how would you start learning Next JS if you would decide to do it RIGHT NOW? Maybe starting from their tutorial from their website first? I see you have a course on your website as well, but it's not updated to Next JS v.15
Nextjs 15 isn't stable yet so no one is gonna make a course about it now as a lot of things can change in the future so learn from the old courses , the new version doesn't to have a lot of breaking changes any way
Thank you, so if you would start to learn NextJS 14, which will be your path?
@@theodordumitrache-z7d I think i would take the codevlution nextjs course as it covers most of the things then go and a pick an orm like prisma then and a database and build full stack apps .
For me, I use nextjs as a hobby and use angular professionally. What I like the most is the constant new updates and new features. I understand some see that as bad, especially when the new features has some bug. However as a hobbyist nextjs, using new features are fun! One thing that is still hard to grasp is its default cache . As of now, I’m trying to understand how I can use React Query Cache and Nextjs cache….. yes it’s complicated
Cody what's the easiest way to migrate a big MERN project which is using commonJS to ESM. I tried it once but not every module supporting that in my project. I want to use langchain and openAI in my project and its using ESM.
IMO Nuxt (Vue) is much more enjoyable to work with DX wise.
Sunk cost fallacy is the reluctance to abandon something despite the abandonment being beneficial. In this case abandoning Next or React probably wouldn’t be beneficial for you so it doesn’t meet that definition.
Yes, this is closer to path dependency.
nextJs is the indusrtry standard for backend for frontend framewaork, however nextJs is still behind when it comes to tooling for a backend that talks to the database!
Why dont you just use nestjs with tsrest or trpc to call from the frontend or whatever. It has all the stuff you might need in a robust backend
What's your take on Remix and its prospects?
Your arguments make sense, but they're especially good because of the context you mention. It's quite rare for people to defend things but concede that there might be biais in their thinking-which is a shame, because, here, it makes your arguments much stronger, and it builds more goodwill.
Of all that you've said, React having paid the bills for years is probably the one that resonated with me the most.
And I don't know that the sunk cost fallacy really is a fallacy here. If you've spent years building skills, that's a cost, which you no longer have to pay, but which you would absolutely have to pay to use something else.
So the more you know something, the less attractive other options become, regardless of their "objective" or "out-of-context" or "absolute" qualities.
Of course you can start assessing whether the alternative's benefits outweigh this cost, but I don't think switching to something similar to Next.js like Laravel would be useful enough to justify the cost.
Yeah like I mentioned on X, if a new technology comes out, it has to at least make me 20-40% more productive for me to consider investing the time to switching. Turns out most of these alternative approaches provide little gain imo
might be interesting to create 2 same projects with different frameworks to see, if nextjs video would be more popular with views than other stack. but who wants to create 2 same apps with different techs :D
Hey, could you tell me about your working machine? Is it good for web development?
Mac book pro 3, works great!
What is "still" mean
Can someone tell me why next is not good anymore?
People are feeling next and the whole react ecosystem is overcomplicated now so they are switching to alternatives but In my opinion providing the same ux and make large softwares I think nothing beats react ecosystem.
Next is better than ever. People saying next is over complicated are either just lazy or want literally everything done for them
People on X really love bashing next
Quick question, how do you find your pictures for your landing pages? Like the arrow inserted on the bullseye target for your starter kit.
Idk these are all premade components I copied from tailwind components
@@WebDevCody thanks for answering!
Honest video❤
Adopting a framework, any framework, means embracing the 1000s of decisions that went into designing and implementing that framework. This is almost always better than spending time trying to re-invent everything the framework authors created. Once mastered, the advantages of switching frameworks have to be significant to justify the effort it will take to switch and re-learn from the ground up all the decisions the new framework authors baked into it.
NextJs/React is my choice in frontend UI. Spring Framework is my choice as a backend API server. Its very unlikely I'll switch to anything else for years.
What's your opinion on plain using React or next only for the frontend and using something like Aspnet/spring or anything like that for the backend?
@@adamweyrah8363next is the backend you are literally deploying two servers 💀
That’s fine if your project use case needs a stand alone api that different types of clients need to consume.
Next js is not fully compatible with bun because nextjs uses some very obscure/unpopular Node APIs that Bun hasn't yet implemented. That's why I go with Vinxi + tRPC + tanstack router. It's vanilla JavaScript, it will run everywhere
I don’t use bun. It’s too new to depend on imo
Nice beard cody!
Do you maintain a large next.js codebase or you just run tutorials? Because you seem to be jumping across frameworks everyday. It's different if you had a large pages project and now they're pushing app router with a completely different design and you have to rewrite a lot.
Yeah but that’s my point, you don’t need to rewrite anything. Until they m says pages is deprecated, keep using pages
@@WebDevCody it's very obvious pages has been deprecated. It's currently on life support. All their attention is now on app router
love your opinion
Cody. Thank you. 🩵 I wish you well in all of your endeavours sir
PHP and Laravel is the way 😎
to be honest, the most important for u, is the LAST one u mentioned. the one which has more demand.
After moving away from php I went all in on js and Next with ts. I’m tempted to learn all these others but then I have to ask why? I really like Next. On the other hand, keep in mind that a jack of all trades is a master of none.
Learnt Next13/14 for 6months... Back to Laravel baybeh! There's just some DX missing in Nextjs that's in Laravel
I've the opposite problem, I don't feel particularly specialized in anything. It sucks.
you could have just said sunk cost
If you are using React, Next is probably one of the best option. But imagine a world where Next wasn't build on react. It would have been even better lol
Imagine it was built on HTMX!! 🐴 The best world
Are people still seriously considering PHP ?
For me it's Next.js or Astro at the frontend and Django as api/backend. Deployment with Docker and DigitalOcean
curious why django
@jikaikas I worked with Python and Django for years before I even got in Next.js and node.js and Python is a great clean language Django is a clean stable proven framework👌
Astro is kinda the tits. I've done a bit with it and it feels pretty good. Still a bit of over-kill I think, but I do like.
same here.
@@jikaikasit's a mature full stack framework. We use it at work, it's pretty good for api endpoints, serving html not so much.
Next is hard. It loads 4mbs of js to run anything, suspense is broken for me and at the end of the day all the cool features are so hard to actually use you are at best shipping a laravel equivalent... skill issue
Where do you get 4mb? And what’s hard to use? How is suspense broken? It’s literally just an asynchronous process
4mb? Next is specifically built to tree shake so a limited amount of js is passed on the initial page load
Right I was looking in dev mode (stupid). In prod it's way under a meg. Suspense wrapping a server component that's fetching data is still broken (won't show the fallback) and caching is also broken (won't revalidate after revalidatetags was called, even when including the tag in the fetch request)...
@@edhahaz None of that is broken. All features that I and thousands use on a daily basis and if you are having issues you are prob doing something wrong and need to ask for help. A very normal part of dev
@@null_spacex yes it's not borken also it's very easy to use and vercel is cheap
Great video. I am just a team React. I predominantly use Next Js, Remix, or Astro if I need something static, and for content management, I use Strapi.
I get a lot of the complaints against Next.js and React but I still think that they are awesome options for most projects
Love the netural stands on laravel in the video cody💕
As someone who's been coding for a year and has almost exclusively done so with react/NextJS I gotta say.. I chose poorly. Laravel is simply better. Even with react on the front end laravel is a much better solution. Yeah you need to learn php but if you go with inertia+react on the front end you're not wasting your react knowledge and learning the laravel back-end infrastructure is surprisingly easy (mostly because their documentation is actually good) .
Next.js is a great framework, you just have to ignore all the BS Vercel is trying to push on you.
Curious what bs Vercel is pushing on you from using Next?
@@brandon-t7s Vercel built Next. So....
@@MarkDeibert yes I know this. But that doesn’t answer the question? im not trying to argue I’m actually just curious
@@brandon-t7s there's not really anything they "push" on you, they're just repeating popular Twitter talking points
@@brandon-t7s I think they meant that vercel pushes the deployment of your next.js apps to their own platform. They make it stupidly easy to deploy there. On the other hand, I've read people having trouble deploying anywhere else. Personally, I've only deployed free apps to vercel, and have yet to try other platforms to test that claim.
Like you, I am using Nextjs but knowing SolidJs is much better in every way...
What’s the main benefits?
@@WebDevCody SolidJs syntax is like React but it is super easy to write due to its built-in signals and context for client side state management. Great DX. It runs super fast with small build bundle size. No re-rendering hell.
@@WebDevCody And a built-in feature for server side state management, too! No Tanstack Query is needed.
I hold to my words drizzle it is not the right choice to use it lacks alot of features maybe if your app is simple crud app but newer software need to deal with geolocation data or other stuff that you need to read the drizzle docs to implement the types yourself and other stuff
I kinda love Drizzle ORM. What do you think is the best ORM?
@@MarkDeibert Prisma
@@MarkDeibert
Prisma have same issue and sometimes worse than drizzle for now i enjoy using Kysely yes it is not an orm but it is better than drizzle and prisma and you could have codegen and you will have a typesafish queries better than others
This sounds like a typescript skill issue and has nothing to do with ORM or whatever tools, as you expected ORM to do something that aren't intended to have, as in general SQL database there is not such a "specific structure type" for JSON or object. You need to specifically handle those by yourself. Technically speaking though, it's not even a skill issue, Geo data typescript is very complex. It's how it's.
At the end of the day, if the data is coming from trust source and you don't want to validate the geojson/geolocation structure due to performance issue, and just want to render it, blank if the structure is broken, then hard cast "data as Geolocation" or "as GeoJSON....." is all you need. And make sure to have "Partial" to help you guard against the undefined bug if you don't want to validate those geo data beforehand.
Your problem is essentially a runtime thing, and you need to take the tradeoff by yourself. Whether you do the runtime validation (which could be terribly slow because geo data tends to be very huge with tons of different keys and complex structures). Then all your typescript after that is good to go. Or you don't do validation and direct run through it if the end result allows you to do that, then define the typescript and make all the key optional.
Source: myself. Have to write function to process geojson data, convert some old javascript functions to typescript (originally "any" is used everywhere), catch many undefined bugs from those geo transform functions alone the way, need to check its data structure carefully and manually, recursion check etc. interact with 3rd party libs like D3 when typescript is all enabled for all of them. One key takeaway is if you decided not to validate the structure make all the key optional is your best safe bet.
When a typescript object is typically complex and very dynamic like text content object structure in rich text editor, or Geo data, nothing can save you other than yourself.
If we really want to honest about this topic. There are 2 "influencers" that cause a lot confusion in this space, an Ex-Netflix and Ex-Twitch employee.
I don’t think I’ve seen theo deviate from react or next, so not sure what confusion you’re referring to? Prime just hits on every topic and backend language it seems. I think he just enjoys learning about languages
IMO Next.js is meant to be used by .01% of web apps that require advanced control of caching, ISR, SSR, etc, most web sites can be successful with WordPress or astro.js with solid.js or react and that is, happy days. The problem is that many devs know about next.js cause they make lots of noise 🙄
Nothing is stopping other devs from making videos on it
But just because it has that many features does not mean you HAVE to use them. But it gives you the option to do so if you need to.
I agree that most apps are static or simple SPAs but you can still do tht with Next. Now imagine you are working on a simple site and in the middle some requirements change. You will have to add a server, some type of cache or any of the many things that next already offers - which will be a hastle in most casses. Instead, with Next you can just use more of its features and be done with it.
And ofc now there are more and more technologies adapting such features, but still, there is a reason why even the React docs now recommend starting any react project with Next
Well to each their own I guess
Solidstart or solid is pretty similar to react - nextjs 😂
On your first point, I dont see why you wouldnt move around and learn other frameworks regardless of having the most knowledge in next/react/js. As it would just be an enrichment of knowledge and skills instead of a complete turn around. I use virtually anything I can get my hands on, as long as I understand and enjoy what im doing using a framework really doesn't matter at all. I think the entire community and the modern day developers just pidgeon hole themselves into 1 little nook and stay there fearful of anything that isn't "their thing".
Ive used a lot of different things. At the end of the day they all feel like a different way to achieve the same thing
Sunken costs for 500, Alex.
i think that if react adapts signals is just gg hahgaha
Nextjs is a resource hog and will easily consumer 4GB+ of memory for a simple dev server. It's also slow, where links can take like 10 seconds to load and it's not the backend it's waiting for.
I switched to Remix out of pure frustration/desperation because at least I'd stay in React, and to my complete surprise, no more memory or performance issues, and feels so much more lightweight. Feels like how fast an SPA is supposed to be.
Never going to use Nextjs again and won't ever recommend it to anyone
Theo mentioned
When? I don’t remember at this point
@@WebDevCody 13:53
Next.js got complicated when vercel started hiring more folks to over-engineer the product.
The average next.js project doesn't have a well defined structure hence most projects are a pile npm package concoction. Almost every next.js codebase has a different structure and code architecture, and most of them are done bad.
With that said, most other framework are worst
TLDR: sunken cost fallacy and most youtube views
Ok but now pivot to remix to get the views for the next 10 years
You mean react router?
@@WebDevCody And what about ReactRouter as Next alternative for a SaaS?
next.js is overcomplicated. I'am out.
skill issue lil bro
And the solution ? Migrate to adonis ? Ok for apis but for frontend are you serious bro
What’s complicated? It’s literally so simple
Pretty sure you'll deal with the same thing in other frameworks just with a different API/syntax.
Nextjs 🤔
JavaScript ecosystem , yes.
Y'all sleeping on Adonis fr
Same...
Funny watching copilot trying to write its own list lol. Kind of goes to show how much LLMs still lack high level, opinionated thoughts around software engineering. They are great tools, but just a tool. Nowhere near yet replacing human engineers.
To be fair to the LLM it didn't really have any great context to go off on. Still takes a human to setup these models for success and validation is my point.
You are selling Laravel without intending it...
Let's be honest, JS ecosystem is broken, instead of having a community helping you to solve common problems, you've a community trying to sell you services SaS.
not a fan boy whcih is very good, i don't like theo because he's always justifying react and nextjs in all aspects which is sad
vue vue vue
Second❤
First✨️
simple to main? jeez, am i the one complain about patching fetch
They listened to feedback and they are reverting bunch of those fetch and caching defaults. And what he said is right. You could have upgraded to Next 13 or 14 without ever touching the App Router and just continued to use Pages Router. When they do breaking changes, they really aren't a chore to implement in a codebase and new features introduced are usually incrementally adoptable and opt-in. Most of the time you really aren't forced to use something new in Next or React.
TL;DR - Skill issue
Absolutely
Maybe you're too lazy to learn anything else😂
That’s an possibility