Giving Up On Next.js | Theo Reacts

  Рет қаралды 108,845

Theo - t3․gg

Theo - t3․gg

2 ай бұрын

I'm an App Router fan. I'm really thankful I adopted it. Sadly, not everyone is.
This story by Brandon from FlightControl showcases the pain they had trying to adopt App Router and React Server Components early. While I obviously have had a different experience with RSCs, there are many points I agree on, so why not share with the world?
In the end, they'd take Remix over NextJS. Would you?
ARTICLE: www.flightcontrol.dev/blog/ne...
Check out my Twitch, Twitter, Discord more at t3.gg
S/O Ph4se0n3 for the awesome edit 🙏

Пікірлер: 349
@scrubmunch5268
@scrubmunch5268 2 ай бұрын
ah yes, blitz a framework for next.js, a framework for react, a framework for javascript!
@whatsanimesh
@whatsanimesh 2 ай бұрын
Javascript, a framework for c++, a framework for assembly, a framework for binary... 🤯
@mohamedkacem5095
@mohamedkacem5095 2 ай бұрын
don't forget to shove Typescript in there
@complexity5545
@complexity5545 2 ай бұрын
Once you go more than 3 (to ~4) layers of abstraction, you're screwing somebody over. They'll never get wholesale or manufacturer's price. Same thing in Computer Programming. There should only be 3 levels of salesmen involved with getting a product: Government Tax , creator of the product, management of the creator. Once somebody else gets involve after that, then a upsale occurs and the last guy is dooped. The whole ecosystem of JS is like that. It reminds me of Java. I learned to recognize excessive bloat due to the Boomer's love of Java. P.S. Some times a handler controls the consumer (like a parent to safeguard against the consumer harming itself). That's when its ok to go 4 deep/tiers,
@v2ike6udik
@v2ike6udik 2 ай бұрын
​@@complexity5545government tax reptile, i see. Tax money for wars, that are only held to waste public resources and depop strongest man in the society.
@TBButtSmoothy
@TBButtSmoothy 2 ай бұрын
​@@whatsanimeshbalance. all those layers up to C++ handle certain tasks. Javascript is a scripting language... which then became the foundation of todays crap
@DeanRTaylor
@DeanRTaylor 2 ай бұрын
It's kinda disconcerting to hear that you were on the phone with people at vercel and having issues with the app router while deploying it, maybe you've mentioned it before but I've only ever heard you promoting the app router and saying you're using it in production, it is probably one of the biggest reasons that I even considered trying it, not for anything big I must say. I get that you feel that you were helping people but Is it not possible that you only got what you needed fixed and it probably wasn't actually production ready for most other people? It comes across a little disingenuous as you are, I believe, sponsored by vercel.
@sajeevshanmuganandarajah5252
@sajeevshanmuganandarajah5252 2 ай бұрын
This should be higher up
@DeanRTaylor
@DeanRTaylor 2 ай бұрын
@@sajeevshanmuganandarajah5252 glad someone else noticed
@lucylu184
@lucylu184 2 ай бұрын
It certainly does. Theo is great to listen for opinions (they helped lots for my own projects) but that's it.
@deybmen
@deybmen 2 ай бұрын
yep, no wonder he's shilling for next lol
@eddiejoe
@eddiejoe 2 ай бұрын
Theo said in a video one time that moving your components into other routes will break your app I was persuaded to never use remix. After learning a tiny bit about remix I know that’s not the case so it definitely felt disingenuous and I’ve consumed his content a lot less ever since.
@krellin
@krellin 2 ай бұрын
as a backend engineer it is insane to me how much frontend devs overcomplicate their lives wtf is this shit
@naughtiousmaximus7853
@naughtiousmaximus7853 2 ай бұрын
I am thinking of just moving to backend, this shit is infuriating.
@quintesse
@quintesse 2 ай бұрын
As a backend engineer who sometimes gets forced into doing frontend I wonder the same thing! I decided on using Next.js for a project for a customer because of how easy it was to get up and running. All good and well until you start running into situations where you're trying to do things that Next.js wasn't designed for. Then you're f-ed, because either you spend a large amount of time in becoming a Next.js expert to solve the issues the "proper" way or you start introducing work-arounds and escapes. For me Next.js makes the easy easy and the hard very hard. It was only later that I learned about Remix and I have no experience with it so I can't really say if it's really any better, but I like their KISS principles. And of late HTMX has _really_ drawn my attention, because it just moves everything back to the server again. The only thing that stops me is that I'm not sure how hard it would be to create complex UIs with it.
@jwoods9659
@jwoods9659 2 ай бұрын
@@naughtiousmaximus7853Yes as a new developer learning. Dude you can spend 3 hours on stuff and not spend a single moment working on core logic. I moved on to go
@krellin
@krellin 2 ай бұрын
@@user-ow9uq3uc7u programmers are not being replaced with ai... there is no intelligence in any of the tools they showcased... they will assist you but not replace you, unless you are doing mindless drone work then yeah, i'd be surprised if those people didnt already get laid off
@jwoods9659
@jwoods9659 2 ай бұрын
@@user-ow9uq3uc7uNot but 90% of this stuff can be done with GOLang and HTMX or so forth. That is all it's going to take a more advanced htmx. maybe like a hybrid "framework based on htmx " thats not really a framework and its all done. React needs to go back to the basics.
@flybayer_official
@flybayer_official 2 ай бұрын
Clarification: we don't think serverless is evil 😄 Serverless is awesome and has many great use cases. We do prefer running our user facing requests in containers. Both should be easy to test and see what's best for your each use case.
@Beyram1501
@Beyram1501 2 ай бұрын
I fixed all my nextjs problems installing an npm package. The package was called remix I think? I really love the fact that I don't have to call them on the phone to fix my production deployments, they use something called web standards which make those issues almost impossible to encounter
@C4CH3S
@C4CH3S 2 ай бұрын
I fixed my nextjs problems by installing sveltekit.
@blessdarah1256
@blessdarah1256 2 ай бұрын
LOL... this comment tree is gorgeous
@lucylu184
@lucylu184 2 ай бұрын
Hahahah
@kizigamer6895
@kizigamer6895 2 ай бұрын
Me avoiding NEXTJS as Astro does it for me with best dx and all web api with SSR and spa both and if I want to use any ui library I can react,svelte , whatever or just simple html,CSS also Astro is just does it all without this over complicated mess
@TheSaud007
@TheSaud007 2 ай бұрын
I fixed all my nextJS problems by resigning my job. I am farming potatoes now.
@NeoChromer
@NeoChromer 2 ай бұрын
is this a 40 minute video of Theo coping nextjs is good?
@eldarshamukhamedov4521
@eldarshamukhamedov4521 2 ай бұрын
Yes
@brahimbenfares1464
@brahimbenfares1464 2 ай бұрын
YES
@mayormccheese8673
@mayormccheese8673 2 ай бұрын
Yep!
@julianjackson8756
@julianjackson8756 2 ай бұрын
I'm liking the speed at which I can build things in Remix. It feels like a lot of overhead knowledge is needed just to navigate the pitfalls, where as in remix, I don't need to be super clever about approach just to make it work.
@brahimbenfares1464
@brahimbenfares1464 2 ай бұрын
remix is just better
@blessdarah1256
@blessdarah1256 2 ай бұрын
I thought I was the only one who felt that way. What are you using for your database layer in Remix?
@OA00000
@OA00000 2 ай бұрын
until you get out of basics and then there is zero remix sources out there, you need to build everything from strach or spend hours figuring shit out... people that like remix are the ones that never put an app with real customers using remix in production
@lucylu184
@lucylu184 2 ай бұрын
​@@OA00000doesn't shopify use remix?
@MrHamsterbacke756
@MrHamsterbacke756 2 ай бұрын
What are you missing? What can't you get easily in Remix? Genuine question.
@rmdashrfv
@rmdashrfv 2 ай бұрын
"Try your best to engage with the points, not the fact that I am paid by Vercel sometimes". This is the current state of software engineering in 2024 folks
@meyn6161
@meyn6161 2 ай бұрын
Advertainment
@benmcmullan718
@benmcmullan718 Ай бұрын
Its the current state of the internet man, everyones trying to sell us something they got paid for or get for free.
@gideonkonig7574
@gideonkonig7574 2 ай бұрын
Great video! This was one of my favorite ones of yours that I have seen so far. Specifically, the second part was amazing. Watching you write code and play around in a small project like this and explaining the various concepts that you are using was really helpful for me, and I highly encourage you to make more content like this. I kinda ignored Server Actions and the specifics of SSR and the Server/Client boundary, as I am still somewhat new, and wanted to just "get started" without getting overwhelmed. For this reason, I used the T3-Stack with tRPC and the NextJS App Router and stick to "use client" everywhere for now. After having watched this video, Server Actions clicked for me, and I now question the usefulness of tRPC if the same functionally is now seemingly built into NextJS.
@flybayer_official
@flybayer_official 2 ай бұрын
the Next patches we have are super minimal (like changing the caching headers for images). nothing that would affect dev server memory leaks. Also many other people are experiencing the memory leak/crash issue too, as you can see by replies to my original tweet of this article
@blueprint7000
@blueprint7000 2 ай бұрын
In general, last winter was a difficult period for learning Next.js and React. While new concepts were rapidly being introduced, all the tutorials and information were based on the old page router, leading to confusion, especially with RCS and with the new feutures people wanted to learn thru the Next js docs. Most of the things i manage to get to work where months after when i found a new tutorial . Next js docs did't help at all
@alastairtheduke
@alastairtheduke 2 ай бұрын
THIS, exactly why I never bother learning next yet
@JimmyKeeseeJr
@JimmyKeeseeJr 2 ай бұрын
Agree. When I signed up for react in it's first year I wanted a front end framework. It's crazy server stuff is pushing me to htmx or solid.
@rodjenihm
@rodjenihm 2 ай бұрын
This is also why "being early" is not always the best thing.
@ArcRCG
@ArcRCG 2 ай бұрын
I hate that I had to relearn React many times, the same with Next.js. Hope they can stop at certain point and stop adding new "features".
@t3dotgg
@t3dotgg 2 ай бұрын
This is a very fair summary of an experience so many devs had. Doing my best to help push us through 🫡 Agree with all the commenters saying "being early" isn't a great thing, it often hurts as much as it helps. I got to React and Next incredibly late
@Daniel-vl8zm
@Daniel-vl8zm 2 ай бұрын
Yeah at this point I honestly don't see a single argument for using NextJS over Remix in any project. Especially with the new Vite dev server Remix has just dropped
@andreyyastrebtsov4367
@andreyyastrebtsov4367 2 ай бұрын
More than that, Remix does not drop SPA users like Next. You can now build usual SPA app with remix. One mental model for both ssr and spa, pretty cool.
@KevinVandyTech
@KevinVandyTech 2 ай бұрын
@@andreyyastrebtsov4367 We've had the ability to escape the next.js router and make a SPA in Next.js for years too though. The new Remix SPA mode in Vite just offers a more official way to do it.
@jasekdominik
@jasekdominik 2 ай бұрын
what about SSG and ISR?
@andreyyastrebtsov4367
@andreyyastrebtsov4367 2 ай бұрын
@@jasekdominik as far as I know SSG right now is not supported, I don't know what is ISR but Next docs regarding this are in pages router section, which is the old way
@Daniel-vl8zm
@Daniel-vl8zm 2 ай бұрын
​@@jasekdominik You can get pretty much all of the benefits of SSG and ISR using good old http caching.
@cagdasucar3932
@cagdasucar3932 2 ай бұрын
I appreciate the candor in bias for Vercel, but the whole video feels like making excuses for them. The article's points are dead-on.
@zainkhalid3670
@zainkhalid3670 2 ай бұрын
This literally clarifies all of the issues I'm facing with NextJs. Thank You So Much!
@blessdarah1256
@blessdarah1256 2 ай бұрын
I jumped ship a long time ago and that was it!
@zainkhalid3670
@zainkhalid3670 2 ай бұрын
@@blessdarah1256 Sad!
@alastairtheduke
@alastairtheduke 2 ай бұрын
28:12 call production-ready whatever you want, but a piece of software needs to be free of bugs when released for wide adoption. Who else other than vercel needs to make that determination?
@roxxel8167
@roxxel8167 2 ай бұрын
I dont think that there's something in JS world without bugs
@schussfreudech
@schussfreudech 2 ай бұрын
I dont think there is any software without bugs
@voidmind
@voidmind 2 ай бұрын
For every dev on my team, the Next.js dev server crashes at least once a day. We are still using the page router with version 12, so the stability issues don't seem to be only for the new stuff.
@jonahallibone
@jonahallibone 2 ай бұрын
This is wild because I've been using Next in production since v10 on the pages router and never experienced this kind of instability
@AkashPandya9
@AkashPandya9 2 ай бұрын
Same we're using Pages Router with v13.5 for prod. I've another proj (it's inhouse one so no much worries), with App router v14 & it's real pain in the arse. Pages router were better & I wish we could go back to good days...
@manupadev
@manupadev 2 ай бұрын
Why do you need to go back. The pages router is still here and will be for a long time
@Jorgepr787
@Jorgepr787 2 ай бұрын
I'm using page router with next 14.1.0 and no server crashes at all in dev, qa and prod.
@voidmind
@voidmind 2 ай бұрын
@@Jorgepr787 "dev, qa and prod" You seem to be referring to deployment environments. When I say the dev server crashed, I meant the code you run locally when you run "npm run dev"
@FzsHotDogInDonut
@FzsHotDogInDonut 2 ай бұрын
After a lot of thoughts I went with remix. It was the best decision I have made.
@HDAllGames
@HDAllGames 2 ай бұрын
Yo, did you have any problems with migrating to Remix? We are choosing between Next and Remix, we have strong knowledge in next, but remix seems too good. Can you say something that you liked in remix?
@FzsHotDogInDonut
@FzsHotDogInDonut 2 ай бұрын
@ames Honestly I did not migrate anything. I researched before beginning the project. But as I have seen both framework I will try to tell you diff the best I can. My pick for this was to make sure I can host the build in cpanel. And store images in the server. Not any image hosting place. I haven't hosted it yet. 1. If you know react and react router you know remix. Built for SSR , you can control which file is rendered in the server or the client with a file name convention. [Filename.client.ts/tsx > for only client side, FileName.server.ts/tsx > for pure server render. No client / server name added it will be in the server always.] 2. There are only two server functions , Loader and Actions. Any GET method response handled by Loader and all the other methods are handled by action. 3. Every page is a API route. Every page exports 3 functions , Loader , Actions and Default (component). If you don't give default function it acts like a api route. There is also Link function for styles. I use tailwind css , so I have to use the link function once in the root.tsx [main layout]. 4. 3 ways to use routing. Pages style which good for almost any project. The naming convention is easy to understand. Also there are ways to do routing with folder structure. And the most powerful one remix.config.tsx way. You define every possible route however you want it. They have all the details in the doc. There is also a 3rd party lib that was mentioned in the doc. That uses remix.config.tsx and extends its power. So 4 ways. 5. They have built in Native components and functions for most of the work. Like file uploader , Await ,Defer , Form [enhanced version of native form element]. Their Form works without js. One tip add key property to the form and it will auto reset upon submission. They have 2 types of form fetcher and regular [auto redirect enabled, you can disable it]. You can do read on it. You can use any form lib you want. I like conform [conform.guide/]. It has ssr. 6. Most of the thing you need they already have it , at least the basics. And if a lib works with next js or react it works with remix. But remember to make sure that you know that lib is ssr or csr. You must declare client side component or all will be served in server. 7. Obviously faster than next js. remix do not do waterfall it's parallel. Its lighter than next js. More gut out. More control in your hand. It is just a handler for your request to the server. You can serve remix with almost anything. Express or Deno whatever you want. May be make yours too. I use server.js from this example [github.com/remix-run/remix/tree/main/templates/express]. It is from their official sources. [Edit: Please if you have better handler than this let me know.] 8. The best point is this is not vendor locked and way easier than Nextjs. And Remix is built on the top of react and react router and all of the web that already exists [MDN docs will be your best friend. MDN has it remix uses it.] Basics are keys to master remix. No fancy coding going here. Just as we all begin our journey from our first html file to js file. Remix takes it all in. IT goes back to root. Just normal react and the web apis. Remix will handle ssr and lot's of other things. 9. Do not forget to use enc/type and method in the From in remix. It will not send your image or file or anything to requested api [internal or external]. As the old web worked this way. Remix brings it all back. To do form you really don't need anything fancy. I hope my words made some sorts of sense. I think you get the pain points of next js. It does not exist in remix. But most of us forgot the basic webs in favor of the nextjs , vendor locking over complicated framework. I think this shouldn't be that complicated. Edit: I am not sure but I have heard it many times next js ships canary versions as stable. Which is not good.
@javiasilis
@javiasilis 2 ай бұрын
​@@HDAllGamesI'm editing a video in which we built a startup with Remix. I haven't had lots of experience with NextJS, but I can say the thing I liked the most was how unobstrusive it was. No GraphQL, no tRPC, no broken REST endpoints. File based routing was neat. We also implemented CQRS in the backend (manually wiring it). We must be between the 2 cats in the community which approached remix in such a way. But our backend was decoupled. We could expose our backend logic through different services like GraphQL, and REST or another library/framework without problems. There's no babel support, so watch out for that, in case you use a project like Lingui, which supports it.
@user-gy1oe7hh9h
@user-gy1oe7hh9h 2 ай бұрын
Such a cool video, as always theo, thank you for the content. Also, It would be nice to have more like small tutorials on these next "advanced" concepts.
@TomNook.
@TomNook. 2 ай бұрын
And this is why you should never listen to those developers who try to persuade the team to refactor their entire codebase to use the "latest, greatest" framework of the month.
@DeanRTaylor
@DeanRTaylor 2 ай бұрын
People see older frameworks and think, we need this for x language/lib/framework. They forget that those frameworks were developed over decades and weren't adding unstable new features every week. They got there organically. People are basing their entire livelihoods/careers/businessed on languages or libraries less than a decade old and trying to solve problems that don't really exist and just creating more issues. Kinda insane really.
@primostasis
@primostasis 2 ай бұрын
Wow, I knew we could call the database right away in the server component, but I never thought it could be called in the client component using React Query. I thought you had to create an /api route before using React Query. Damn!!! thanks Theo !!!
@curiousprogrammer90
@curiousprogrammer90 2 ай бұрын
Yes, but I have no idea how this is possible? Any documentation?
@FreeCodeArena
@FreeCodeArena 2 ай бұрын
The server action actually creates the endpoint for you under the hood
@JimmyKeeseeJr
@JimmyKeeseeJr 2 ай бұрын
I love how he spoke right past paraphrasing(annoying useEffect errors that cost you hundreds of thousands of dollars). Next is a mess. Use a web server. Use a client library. Run a server. Your client library shouldn't be your server.
@okie9025
@okie9025 2 ай бұрын
It's just the cyclical trend of SSR vs SPA yet again getting turned around, this time in favor SPAs. I feel like people are coping by calling SPAs and REST APIs "complex" - any modern "metaframework" (especially Next.js) involves dozens of hidden layers of abstractions which is way harder to reason about than simple client-server architecture.
@naughtiousmaximus7853
@naughtiousmaximus7853 2 ай бұрын
I always felt that having something like React on client side communicating with REST API was very clear way of doing things. Nextjs seems like a huge mess.
@PhilipAlexanderHassialis
@PhilipAlexanderHassialis 2 ай бұрын
There is a huge win if you have data that can be fetched on a server level / location before sending the whole shebang to the browser. Otherwise, the browser has to do two round trips, one to fetch the page and another to fetch the data. Additionally, SSR provides easy-to-work-with out of the box routing capabilities, highly opinionated which in my book is a good thing. THAT BEING SAID, I wholeheartedly agree with the rest of your sentiment. If you work on intranet apps where network is not an issue, a good router and a decent route guarding for authorization, may sound a bit of a mess to set up and running but when you get it up and working it's infinitely better than being at the whim of a NodeJS runtime that runs a web server you can't control and then have it do some of the nasty work while you hope it behaves the way you want it to (e.g. do you know you can't disable caching in Next 13+? so you may have users seeing routes they are not authorized to do so because the route as a server component is cached? fun times).
@Pete133
@Pete133 2 ай бұрын
You don't need most useEffect's anymore with server components. I find Next.js to be a lot easier than setting up separate services... obviously for larger scale projects at some point you'll want to separate your backend into separate services, but why not do the easier thing for smaller projects?
@okie9025
@okie9025 2 ай бұрын
@@Pete133 Yeah but if you're using React just as a sort of templating language for rendering static websites using server content (like partly what Next.js does) then 90% of the features of ordinary React will be useless and a lot of extra stuff has to be included in order to make things make sense, at which point you'd be better off using something else entirely. UseEffect is used for clientside stuff, and most people use react-query or rtk-query for repetitive things like fetching data from a server anyways.
@IcTxDiogo-
@IcTxDiogo- 2 ай бұрын
thanks to make this type of content, this has so many knowledge under hood, this is why i aways go here to see yours videos
@NeoChromer
@NeoChromer 2 ай бұрын
yeah, Remix seems to be wining the long term war of the frameworks
@boccobadz
@boccobadz 2 ай бұрын
If you're in react ecosystem, yes. But, honestly, I don't see any reason to go with Remix/Next over Sveltekit when starting a new project. Dev experience is so much better in Svelte ecosystem and you move so fast, it's not even comparable at this point. Imo if you're not going with Go/HTMX that is you need more than that, then Sveltekit is the way.
@polyander
@polyander 2 ай бұрын
@@boccobadz what makes sveltekit so fast, in your opinion? I'd be curious to try, but not sure how easy it is, if I want to build a larger app with auth, payment, roles etc. What's your take on this?
@ee-fq2dj
@ee-fq2dj 2 ай бұрын
​@@boccobadz the react ecosystem is just bigger and for lots of people that's a must have
@HoNow222
@HoNow222 2 ай бұрын
what do you think about vue?
@GermansEagle
@GermansEagle 2 ай бұрын
Theo, you must agree that nextjs dependency with vercel is not safe for a company. The way they deal with middleware is proof.
@furkankalaycoglu2861
@furkankalaycoglu2861 2 ай бұрын
Last part of the video about react query is really helpful. Thanks for including it in
@SaifurRahmanAkash
@SaifurRahmanAkash 2 ай бұрын
I learned more from this single video than my 7h long nextjs course. Tnx Theo
@ermilburn02
@ermilburn02 2 ай бұрын
I tried out the app router before it became stable, and I loved it. I haven't gone back to pages since then, since server components make everything a lot easier
@saurabh75prakash
@saurabh75prakash 2 ай бұрын
The worst part of Nextjs is the abstraction of the web platform. Which makes it difficult for a user to understand whats going on under the hood and also the experience gained in Nextjs doesn't help when switching to a different framework for eg Astro or Svelte. Remix shines in all of the above mentioned areas.
@SandraWantsCoke
@SandraWantsCoke 2 ай бұрын
I do the same with useSWR( "cache key", yourServerFetchFunction, options), where the server fetch function is the same function as you use inside the react server component.
@t_park
@t_park 2 ай бұрын
Thank you always for your hard work :)
@adicandra9940
@adicandra9940 2 ай бұрын
let's be honest here, nextjs 13 dev server is objectively bad. I often wait for 3-6 seconds just to see the changes I made. I can't say anything about next 14 because I didn't try it, and maybe I won't try it. Anyway, seeing Theo doing live code is so refreshing, the way he code + explain in high speed is almost therapeutic, and somehow, I didn't need to pause to process what he says because his explanation is in sync and perfect for what he just typed. How can you do that?
@ChristophHennemann
@ChristophHennemann 2 ай бұрын
Ok that was an amazing call to action. Subscribed immediately :D
@VincentFulco
@VincentFulco 2 ай бұрын
One of your best! More on react query and server actions best practices please! Version 14.1 is night and day difference than 13.x.x
@Red7iger
@Red7iger 2 ай бұрын
NextJS is incapable of handling any kind of regional internationalization without or without packages because the routing is so limited and the baseUrl is a next.config.js field meaning you cannot make it different based on the domain the request is comming from.
@rahulrh2715
@rahulrh2715 2 ай бұрын
Have you tried i18 next that would work i guess
@Red7iger
@Red7iger 2 ай бұрын
i18n-next only works by the domain, and has a lot of extra limitation on top of it
@travis_stimw
@travis_stimw 2 ай бұрын
The thing is: Only when you deploy on Vercel can you gain the benefits of edge.
@pyrocentury
@pyrocentury 2 ай бұрын
You can use SST open-next, but there are trade offs. While SST is an open-source solution, Vercel, which is built and maintained by the framework's creators and provides first-class support for Next.js features. SST is an open-source solution, which runs the risk that it can be abandoned without warning. SST also offers less support for streaming features compared to Vercel. However, most apps should still function as expected when deployed through either SST or Vercel. In terms of performance, SST provides control over log retention, caching policies, Lambda function timeouts, and memory usage, while Vercel offers a fully baked deployment solution that requires minimal work.
@FzsHotDogInDonut
@FzsHotDogInDonut 2 ай бұрын
isn't it called vendor locking?
@TheUnknownFactor
@TheUnknownFactor 2 ай бұрын
With regards to "you only have to revert recent changes to find errors", I had similar issues that often occured due to content changes (from Sanity CMS). Added downside for that scenario is that, if everything works with a given set of content, but "randomly breaks" later when content updates, you also don't get to catch that error early in development. Yes ideallly content is immediately tested when it updates, but that unfortunately wasn't an option due to company structure.
@Cruzylife
@Cruzylife 2 ай бұрын
That was a neat demo with react query!
@elCoronelCC
@elCoronelCC 2 ай бұрын
One point that I wonder about is, if you decide to use the same data fetch function on server and client, how do you deal with state in the URL? I would assume that a bookmarkable URL for a complex dashboard would be great. On the server, you can access searchParams; on the client you could update the URL but not trigger a server side fetch of the current route (not sure that is supported in nextjs 14 as there is no shallow routing?), then useSearchParams. But you would have to keep server and client approaches in sync again.
@arashitempesta
@arashitempesta 2 ай бұрын
still on old router as we in process of migrating an even older implementation with express BUT, thanks for the walkthrough about how it might look like to add refetching and onFocus updates. Its still kinda confusing the set up needed but not different from just having a services directory for all of those calls, and in this case you are calling DB directly but you can also call third party or internals.
@andru5054
@andru5054 2 ай бұрын
The discord server for next js is run by children
@justafreak15able
@justafreak15able 2 ай бұрын
What happened?
@night23412
@night23412 2 ай бұрын
you should see the subreddit lmfao
@andru5054
@andru5054 2 ай бұрын
@@justafreak15able they didn't like lmao-lang
@jonathanluna7349
@jonathanluna7349 2 ай бұрын
lmao
@maharta8458
@maharta8458 2 ай бұрын
@@andru5054what is lmao lang?
@paulorumor6881
@paulorumor6881 2 ай бұрын
If it's production ready then it should be stable, otherwise is not production ready
@koenlemmen
@koenlemmen 2 ай бұрын
Full video on turbopack would be nice. Might move to it.
@griffadev
@griffadev 2 ай бұрын
I love the new patterns but I seem to get horrible performance on vercel with cold starts. Not just for initial page load but the rsc calls are painful. SPA with trpc just feels better most of the time the more complex your app gets
@tippififestarr6519
@tippififestarr6519 2 ай бұрын
I'm enjoying this video, 9:50 in you mention the Jack Herrington video but I can't find it. Plz link?
@Naton
@Naton 2 ай бұрын
i had the choice to pick next or remix as my first react app. i went with remix and loved it. remix thought me web standards and edge cdn caching
@dejoma.
@dejoma. 2 ай бұрын
Theo what do you think of "Kinde" auth versus "Clerk"? I've seen a lot of hate on Clerk lately
@DownUpward
@DownUpward 2 ай бұрын
I love Next.js because it's really driving the adoption of htmx.
@SandraWantsCoke
@SandraWantsCoke 2 ай бұрын
hahahaha
@okie9025
@okie9025 2 ай бұрын
For me it's (somewhat) the opposite - HTMX is making me wish we could go back to clientside SPAs and web API backends instead of whatever the hell this new "return to tradition" trend is.
@kjetilhartveit
@kjetilhartveit 2 ай бұрын
Thanks for another thoughtful video. Didn't know you could use server actions for fetching stuff, will definitely look into that (and probably uninstall tRPC). I'd say Next.js is reaching quite great levels of DX for fullstack-development once learning the new stuff and not leaking data to the client and so on
@dachewster9999
@dachewster9999 2 ай бұрын
You like to speak down about Qwik, but I'm still not convinced you've actually tried it yet. It really is just a better DX, and elegantly handles nested layouts and stuff much nicer than NextJS
@naughtiousmaximus7853
@naughtiousmaximus7853 2 ай бұрын
​@@wielomarianwhy is nextjs so demanded, it doesnt make sense
@aakarshan4644
@aakarshan4644 2 ай бұрын
why is there a framework on top of nextjs?
@kasper369
@kasper369 2 ай бұрын
So what your saying is we need another JavaScript runtime?
@peepeepoo3432
@peepeepoo3432 2 ай бұрын
you should redo the tanstack demo at the end of the video, but in solidstart. it's exactly what you are doing but the framework supports it out of the box, doesn't have you calling POST requests to get data, doesn't have you pass props to populate an initial cache external to the framework etc.
@cedigasser
@cedigasser 2 ай бұрын
The benefits with layout using the new app router or that Suspense feature are something I took for granted having learned SvelteKit. Now learning about these things in react kinda makes it sound like react / Next is not up to speed compared to modern frontend frameworks.
@ahmedivy
@ahmedivy 2 ай бұрын
Seriously i didn't know that we can pass server action as a param to queryFunc, thats so cool
@curiousprogrammer90
@curiousprogrammer90 2 ай бұрын
I'd like to hear a bit more deep explanation of that. :) I was also surprised.
@Daniel-vl8zm
@Daniel-vl8zm 2 ай бұрын
Really liked your explanation on Stable vs Production Ready. That makes so much more sense to me
@wrux
@wrux 2 ай бұрын
I saw Theo is using pnpm here. What made you stop using bun?
@MegaLeoDOM
@MegaLeoDOM 2 ай бұрын
hey, theo this source code you showed us is open to study?
@Tian-wi6qr
@Tian-wi6qr 2 ай бұрын
If you are building just the frontend part of the application, better to use vite + tanstack router tbh. Massively better DX with next to no UX downsides.
@gcoller
@gcoller 21 күн бұрын
Measuring time by Theo's mustache needs to be included in the ISO 8601 standard.
@JohnSmith-gu9gl
@JohnSmith-gu9gl 2 ай бұрын
Hi Theo! Just wanted to tell you that you are fired. sincerely yours Vercel Team
@paxcoder
@paxcoder 2 ай бұрын
Which Jack Harrington video are you suggesting we see to learn about Suspense?
@ChristophNolte-oh1wu
@ChristophNolte-oh1wu 2 ай бұрын
SvelteKit does also support streaming for loading the first request. But you don't have to duplicate the logic to do the same request from the client.
@bugged1212
@bugged1212 2 ай бұрын
Instead of having these next server side db functions that have the advantage of returning the same type, if one is using a BE server that is not Next, and in my case graphql, one could just as well use Mutations on the Next server side that also guarantee the same type safety.
@DiversifiedPlayz
@DiversifiedPlayz 2 ай бұрын
Is that code public would liek to have a look?
@mattburgess5697
@mattburgess5697 2 ай бұрын
We made some very similar decisions. We ported a React app to NextJS and opted to go the app router for future. The experience has been "mixed" to be polite. I think things are in a much better state now, but at the time, getting things like translations working, getting authentication, etc, were frustrating, undocumented dead-ends. Much core functionality had to be hand-rolled and is still client-only tech debt. Honestly my biggest issue with the situation for Next right now is the absolutely awful dev server, which is unbelievably slow. Edit: And turbopack doesn't make a difference. Still 20 seconds to navigate.
@nicolasguillenc
@nicolasguillenc 2 ай бұрын
Dev server performance video? That would be awesome
@CouchProgrammer
@CouchProgrammer 2 ай бұрын
2:54 These things didn't exist in NextJS before. Actually it was possible with JSP, aspx, razor... And there it is implemented in a much more flexible way. You can probably even do this with Astro right now, because the route loading in Astro can be changed via plugins. 11:08 useTransition for links is an anti-pattern because the user is waiting in the wrong place and cannot cancel the download. The transaction context is violated. 16:18 The old model is not a SPA model. Previously, all applications were designed to quickly fetch data on the server, and the blue rectangle was used only for requests initiated by the user within the page. And these requests were processed in the same way. That is, both models discussed in the video are less effective than the standard SST with a small js bundle for each component. SPAs were never actually used for websites, and if they were, it was a mistake. On the other hand SPAs were very good for application development and in these applications SSR was not used as they were delivered to the client in the form of PWA.There were, of course, attempts, but they were all failures.
@curiousprogrammer90
@curiousprogrammer90 2 ай бұрын
Can anyone explain how "user server" api calls work as "queryFn" in react-query?! Thanks! :)
@devqubs
@devqubs 2 ай бұрын
how's solidstart?
@xtremescript
@xtremescript 2 ай бұрын
Man. Incrementally migrating from pages router to app router is basically impossible if you use internationalization. Literally not possible. And I find this to be a pity. We are stuck on pages router unless we redesign everything at once. Fix that shit. Allow us to pick and choose wildcards for routers. Filesystem based routers are crazy anyways.
@Goshified
@Goshified 2 ай бұрын
How is it impossible? You can use a combination of dynamic routes, middleware and rewrites. The “choosing wildcards” you’re referring to is pretty simple in middleware.
@xtremescript
@xtremescript 2 ай бұрын
@@Goshified Okay replying in youtube is fucking broken or it doesn't work if you post links. Just go to vercel's nextjs repo and search through issues for "is:issue is:open internationalization migration". 5 open issues. Leerob has also stated that it doesn't work. As long as you have i18n in next.config.js it simply doesn't work right. And the funny thing is, there's no way to tell what it's actually detecting either. There's no native way to get the route list unless you run next export and then parse all the exported files. Freaking rad.
Ай бұрын
28:22 What do you mean "People would read into it in specific ways"? It literally said "App Router is ready for production". What is that you can possibly read into this sentence?
@RolandAyala
@RolandAyala 2 ай бұрын
Was on Nextjs, swtiched to Remix. Great decision.
@saura_
@saura_ 2 ай бұрын
The subscribe hook was so good that I suscribed with all my accounts
@nandans2506
@nandans2506 5 күн бұрын
12:50 what app is he using to draw?
@quantum-ng8bs
@quantum-ng8bs 2 ай бұрын
Personally I switched to Laravel and never looked back.
@TurtleKwitty
@TurtleKwitty 2 ай бұрын
I love how you were trying to be all like "Look how easy it is to do this right" and then proceeded to make the most confusing complex fucking bullshit ever, not by your fault purely casue react and next fucking sucks.
@mikkelwf1984
@mikkelwf1984 2 ай бұрын
Reupload or edited video? 🤔
@Fiercesoulking
@Fiercesoulking 2 ай бұрын
I fear the day we move away from serverless and React Theos world implode D
@DennisRasmussen
@DennisRasmussen 2 ай бұрын
Why would you want to use Next.js for a dashboard type application? This is what puzzles me the most.
@rand0mtv660
@rand0mtv660 2 ай бұрын
Why not? It has good DX and handles bunch of stuff out of the box. What would you use if you had to build a dashboard app?
@Tian-wi6qr
@Tian-wi6qr 2 ай бұрын
@@rand0mtv660 If it's just the frontend part then definitely Vite + tanstack router. And tbh, even if it's fullstack, I'd still prefer express + vite, too many pitfalls and hacks needed to make next.js work correctly for next to no benefit. Also the absolutely terrible hot reloading and compilation times...
@JEsterCW
@JEsterCW 2 ай бұрын
@@rand0mtv660 vue with nuxt :) eventually angular cuz its good for data driven projects, react would be the last pick, its better for web apps and ecommey
@yamyam263
@yamyam263 2 ай бұрын
@@rand0mtv660 Either Retool or Refine
@BenKingUK
@BenKingUK 2 ай бұрын
​@@rand0mtv660 A dashboard app doesn't need SSR, you can just make an SPA with Vite, React Router / Tanstack Router etc
@stephan553
@stephan553 2 ай бұрын
Still blows my mind that all these basic things like layouts / nested routes are such a big issue in the React world. The basic Vue Router comes with this since years, and it ain't the only framework to offer this.
@okie9025
@okie9025 2 ай бұрын
It's not a React issue, it's a Next.js issue. The classic SPA React router worked like a charm and still does.
@FunwithBlender
@FunwithBlender 2 ай бұрын
What makes PPR so attractive? Would you not choose SSG with SSR components or go full ISR instead PPR is still an experimental feature. It is hard for me to imagine how it stacks up what its pros and cons are compared to the rest.... usually a hybrid approach gives you the best results what is PPR actually trying to solve...also its still not available with CSR unlike a hybrid solution that uses SSG with SSR components or CSR using SSR components or ISR.... PPR feels like its trying to fill a gap that has been filled in many different ways
@DevGio
@DevGio 2 ай бұрын
Wait until I release my framework for Blitz Let the chain continue!
@tcurdt
@tcurdt 2 ай бұрын
And that's why people seem to be excited about HTMX - you SPA people really love your complexity.
@bezimeni2000
@bezimeni2000 2 ай бұрын
HTMX is just another tool, it's not good solution for everything
@reidond
@reidond 2 ай бұрын
htmx can't be used when you don't have constant internet access
@tcurdt
@tcurdt 2 ай бұрын
And I wasn't suggesting it is. But people seem to be growing tired of the complexity and that is one explanation of the HTMX hype.
@okie9025
@okie9025 2 ай бұрын
For me, SPA is far easier to understand than the 9999 layers of complexity hidden within these modern SSR "metaframeworks". Also, how is HTMX NOT a type of SPA framework? HTMX doesn't server-render the content and it doesn't even work with JS disabled.
@tcurdt
@tcurdt 2 ай бұрын
@@okie9025 I am not advocating for HTMX but for less complexity. And you should read up about everything that comes after "Also,". Because you are off there.
@naughtiousmaximus7853
@naughtiousmaximus7853 2 ай бұрын
How do people just switch to Remix when majority of jobs are Nextjs?
@james.restall
@james.restall Ай бұрын
Remix is just React Router + Vite which there's a ton of jobs for.
@saura_
@saura_ 2 ай бұрын
which draw app is this?
@shivam-dua
@shivam-dua 2 ай бұрын
Excalidraw
@berkaycirak
@berkaycirak 2 ай бұрын
Always demotivating news theo :) , I am so confused of deep diving into next.js or other frameworks. How can we survive :)
@CeezGeez
@CeezGeez 2 ай бұрын
one bummer about next.js 14 is it breaks framer motion exit animations :(
@devzone7
@devzone7 2 ай бұрын
Thanks for sharing 😎😎😋😋
@ccccjjjjeeee
@ccccjjjjeeee 2 ай бұрын
Blitz also gave us superjson!
@t3dotgg
@t3dotgg 2 ай бұрын
I thought superjson was by formidable originally and Blitz took it over? Either way I dig them for maintaining it
@Kane0123
@Kane0123 2 ай бұрын
Superjson? You mean protobufs? 😂
@flybayer_official
@flybayer_official 2 ай бұрын
@@t3dotggyeah we designed and built it for Blitz :)
@t3dotgg
@t3dotgg 2 ай бұрын
@@flybayer_official TIL! Thank you for the hard work 🙏
@syth-1
@syth-1 2 ай бұрын
I use my next js server for production, its stable af!
@carloseustaquio7785
@carloseustaquio7785 2 ай бұрын
TL;DR we're not giving up on Next.js - great video theo!
@anisdragan
@anisdragan 2 ай бұрын
initalData doesn't work with trpc 😢
@aerojeyenth
@aerojeyenth 2 ай бұрын
Theo clearly you are biased but remix has super DX all the wirings you are trying to do get a simple refresh of data is very simply achieved just by using SSE which is a web standard. In my opinion Remix multiple generations better than Next.js. Any new projects should use Remix. Period.
@Josegonza352
@Josegonza352 29 күн бұрын
agree
@Phantom-pj1ls
@Phantom-pj1ls 17 күн бұрын
I think Im fed up with React and its frameworks... time to learn Angular!
@zhanezar
@zhanezar 2 ай бұрын
Layout/pages i think Sapper did it long before next , and then Rich went to vercel and next team must have thought it was a good idea, which it is. be warned, i might be wrong .
@longhiliverocknroll
@longhiliverocknroll 2 ай бұрын
Just commenting but: are we going back to PHP modus operandi?
@voidreact
@voidreact 2 ай бұрын
yes, but without the full page refreshes after the first load
@okie9025
@okie9025 2 ай бұрын
yes, but without a garbage language and with better DX
@Evenisto
@Evenisto 2 ай бұрын
imagine calling PHP garbage and making your entire stack JavaScript
@charuwaka1
@charuwaka1 2 ай бұрын
just a question out of context , can we combine Zustand and tanstack/react-query in React Projects
@azizsafudin
@azizsafudin 2 ай бұрын
Yes. They both do different things. Use react query strictly for syncing with server state/apis. Use Zustand for managing local state.
@kyrorb
@kyrorb 2 ай бұрын
what browser is this?
@michalgajektoja
@michalgajektoja 2 ай бұрын
Looks like Arc Browser
@KappaXBeta
@KappaXBeta 2 ай бұрын
Danke!
@goldydog1
@goldydog1 2 ай бұрын
The turbo flag is okay, but there's so much functionality that it's still missing, that it makes it kind of pointless in our apps
New JS Framework Just Dropped (Next.js Killer??)
30:50
Theo - t3․gg
Рет қаралды 78 М.
Stacking with the Graphite CLI
4:06
Graphite
Рет қаралды 2,2 М.
Қайрат Нұртас & ИРИНА КАЙРАТОВНА - Түн
03:41
RAKHMONOV ENTERTAINMENT
Рет қаралды 1,7 МЛН
小路飞第二集:小路飞很听话#海贼王  #路飞
00:48
路飞与唐舞桐
Рет қаралды 16 МЛН
Mini Jelly Cake 🎂
00:50
Mr. Clabik
Рет қаралды 15 МЛН
CSS Is 2.4x Slower Than Inline Styles (Oh No...)
19:39
Theo - t3․gg
Рет қаралды 47 М.
Do you REALLY need SSR?
18:15
Theo - t3․gg
Рет қаралды 154 М.
The Problem With UUIDs
25:53
Theo - t3․gg
Рет қаралды 101 М.
Responding To The Tailwind Conspiracy
37:25
Theo - t3․gg
Рет қаралды 72 М.
The End Of StackOverflow
9:18
Theo - t3․gg
Рет қаралды 44 М.
The Truth About HTMX | Prime Reacts
49:56
ThePrimeTime
Рет қаралды 329 М.
UI Libraries Are Dying, Here's Why
13:28
Theo - t3․gg
Рет қаралды 255 М.
I DONT USE NEXT JS
54:01
ThePrimeTime
Рет қаралды 304 М.
Start from 0 at any point on the T1 Digital Tape Measure
0:14
REEKON Tools
Рет қаралды 36 МЛН
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 1,1 МЛН
ЭТОТ ЗАБЫТЫЙ ФЛАГМАН СИЛЬНО ПОДЕШЕВЕЛ! Стоит купить...
12:54
Thebox - о технике и гаджетах
Рет қаралды 36 М.
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Рет қаралды 3,1 МЛН