NextJS 15: React 19, Less Caching, Turbopack, Better Hydration Errors and MORE from Vercel Ship!

  Рет қаралды 29,867

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер: 109
@nedimarabaci
@nedimarabaci 4 ай бұрын
Instead of just reading release notes to us, you are demonstrating how it works! This is what makes you different from the others!
@gerkim3046
@gerkim3046 4 ай бұрын
true
@maacpiash
@maacpiash 4 ай бұрын
Now tell that to Theo T3 😁
@isaacjon
@isaacjon 4 ай бұрын
Why ​@@maacpiash
@nobodysaysmynameright
@nobodysaysmynameright 3 ай бұрын
@@isaacjon Because Theo is a sh!t show, a bunch of click bait with no real content. Jack is honestly the man, by far one of the best doing content in this space
@Henrique01010
@Henrique01010 4 ай бұрын
Another great video, informative and well explained, thanks Jack!
@flnnx
@flnnx 4 ай бұрын
Opting in for caching is much better than opting out by default. I'm so happy about these changes.
@jherr
@jherr 4 ай бұрын
Me too. I get where Next was coming from when it was opt-out. But folks were learning a new route layout model, RSCs and caching simultaneously. And that’s too much.
@my_name_is_ahad
@my_name_is_ahad 4 ай бұрын
Can't wait for next js 16 next month!
@jherr
@jherr 4 ай бұрын
Seems like six months is the cadence. And FWIW, this is pretty evolutionary. Your code will just work better on 15. Unless you were dependent on the caching.
@richierob62
@richierob62 4 ай бұрын
Jack, small grammatical error on the pro landing page “His KZbin channel hosts an entire free courses on React and TypeScript” Thanks for all you do. Pretty sure you save me at least 100hrs of research a year.
@saharshg
@saharshg 3 ай бұрын
Crisp, to the point and no non-sense talk, thats why you are awesome!
@imakhlaqXD
@imakhlaqXD 4 ай бұрын
OMG finally no caching by default. I might cry 😭
@phantom7132
@phantom7132 3 ай бұрын
Appreciate your effort Jack! Your videos are so good and your explanation on point. Much love
@consoledoterror971
@consoledoterror971 4 ай бұрын
Thank you for the time and effort you put into this. Really appreciate this.
@JohnFarrellDev
@JohnFarrellDev 3 ай бұрын
This has been so useful, thanks Jack
@billybest5276
@billybest5276 4 ай бұрын
Another great video. Thanks Jack!
@JEM_GG
@JEM_GG 4 ай бұрын
great walkthrough, ty Jack!
@spidfair0
@spidfair0 3 ай бұрын
I like that caching becomes more of an opt-in feature. What I'd like to know is if request memoization is also affected by this change. Deduping fetch calls of a single request was great as it reduced prop-drilling. If caching is off by default, does that also mean that deduping on a single request is also off?
@jherr
@jherr 3 ай бұрын
fetch de-duping during the request is a core feature of React 19, so it's still there. There is some talk that they will stop patching fetch in the future, so we might end up needing to import a specific fetch to get the de-duped behavior.
@haresh-sq4kf
@haresh-sq4kf 4 ай бұрын
​​@jherr will generatemetadata function get deprecated in next15 since you showed we can have metatags inside component
@jherr
@jherr 4 ай бұрын
I don't think so. IMHO it's fine to have two separate mechanisms.
@semyaza555
@semyaza555 3 ай бұрын
Thank you Uncle Jack.
@BuriTechVids
@BuriTechVids 3 ай бұрын
15:26 - In the second sentense (or first two) is explained why we need after(). :-}
@isekaiguy9113
@isekaiguy9113 3 ай бұрын
10:58 You forgot to use html time tag. Video is awesome
@amanda.s.f
@amanda.s.f 3 ай бұрын
Awesome video! May I ask what is your VSCode theme?
@jherr
@jherr 3 ай бұрын
Night Wolf [black]
@nangquy2668
@nangquy2668 3 ай бұрын
About react compiler. I wonder that my exisiting source code had using a lot of memolization, if I want to apply react compiler, should i replace all these memolization function, and react UI framework as well?
@4v4
@4v4 4 ай бұрын
What an informative vid! God bless
@البراءبنمالك-ر1م
@البراءبنمالك-ر1م 4 ай бұрын
Man, it's been awhile since you announced your course and I've been waiting.. How much longer do we gotta wait? :)
@jherr
@jherr 4 ай бұрын
Soon, man. Believe me. I'm right there with yah. Building this thing has been a TON of work.
@yashsolanki069
@yashsolanki069 4 ай бұрын
​@@jherr i would love to enroll into it but being from india i would like to know if the fees are considering PPP or not? Thanks, looking forward to it.
@LuisBlancoAustin
@LuisBlancoAustin 4 ай бұрын
How did get your Mac terminal to look like that? And thanks for all your videos. They are quite informative.
@marshall_grant
@marshall_grant 3 ай бұрын
I could see after() maybe as a tidy way to run 3rd party analytics that needs to also run on the server bypassing the 3rd party cookie apocalypse.
@grugbrain
@grugbrain 4 ай бұрын
in the end of the video, you smile then disappear, like a wizard 👻
@AlanDanielx
@AlanDanielx 4 ай бұрын
Why?
@abhishekvishwakarma9045
@abhishekvishwakarma9045 4 ай бұрын
Legends who are still on the next 12, for their production apps 😌 btw what pointers would you consider for someone who wants to upgrade to Next.js 13-14? great video, informative !
@jherr
@jherr 4 ай бұрын
Wait until 15. It won’t be long. That way you don’t have to worry about caching so much.
@Niko_993
@Niko_993 4 ай бұрын
Is after() a bit like useEffect for server components?
@jherr
@jherr 3 ай бұрын
Conceptually. In that they run after the initial render. In this case it runs after the page is sent to the client. So there is no opportunity to do more for that particular request.
@Niko_993
@Niko_993 3 ай бұрын
@@jherr thanks for the clarification! I think there might be rare cases where we use it. Just can't think of any atm
@chibionchainnfts3535
@chibionchainnfts3535 3 ай бұрын
@@Niko_993 However, you may need to perform tasks such as logging, analytics, and other external system synchronization. the documents shows that
@giuppidev
@giuppidev 4 ай бұрын
I really appreciate your content, great job! I'm a creator too (for italian buddies): how do you get that cool code highlighter effect in your live coding?
@jherr
@jherr 4 ай бұрын
That's a trick I do in post with Screenflow. The "magic" is that I use a pure black background as my theme. Then I just use their callout mechanism to select the areas that I want highlighted, and everything just ... fades away. FWIW, I use a 55% fade. I got some feedback early on that 75% was too strong and you couldn't see the contextual code. 55% seems to be the sweet spot. Also I have a streamdeck and I've programmed some buttons to add the callouts with the right settings, so nowadays I just scrub to where I want it, press a button, draw a box, shrink or expand it to whatever length I want, then I move on. I've even started depending on it, as I talk I remember that I'll be highlight later so I don't move the mouse or the screen at that point. Which is kinda cool. FWIW, it's really import as a creator to automate/simplify as much as you can. The more you do that the more you'll be willing to do the work later. If the effect is arduous to create you probably won't use it as often as you should. If it's easy to create you'll use it as much as you need. Feel free to reach out personally if you have more questions, I'm always open to support folks that spend their time creating for the community.
@prashlovessamosa
@prashlovessamosa 4 ай бұрын
Thanks Mr Jack I have one request can you make a video on SWR i have seen tweet from Rauch about client and server data fetching Its quite good
@jherr
@jherr 4 ай бұрын
Do you have a specific issue with SWR that you are facing? Generally speaking I look at SWR as kind of a paired-down React-Query. So when I cover RQ I hope that, in a way, folks can translate that into SWR pretty easily.
@cooldude3010
@cooldude3010 4 ай бұрын
Awesome content as always. But please tell me creating express mini services inside next projects is not about to become the norm! That's giving me the jeepy creepys. :O
@jherr
@jherr 4 ай бұрын
Hahaha. No. I’d use a monorepo for that! 😂
@dakheera47
@dakheera47 3 ай бұрын
Hiya. im curious as to why you mention that nextjs servers shouldn't talk back to themselves. from what i understand, something on the frontend using next should be able to talk to an api route defined in the same project. isn't that the whole point of having api routes? the bit i'm referring to is here: 11:50
@jherr
@jherr 3 ай бұрын
Yeah, I'm talking specifically about RSCs on the server talking back to itself. The client hitting the API endpoint is totally fine. RSCs on the server fetching back to the API routes is just time wasted for no gain. In addition there is the added complexity of requiring an absolute URL in the fetch which means that the server code needs to know where it's deployed so it knows whether to hit development or production endpoints. What's better is simply to call the same function in the RSC that the API uses when it handles the GET request.
@dakheera47
@dakheera47 3 ай бұрын
@@jherr ok, yea. That makes a lot more sense. If we're on the server anyway, why not just call the function instead of going through an api route. Thanks very much for your videos, I've learnt lot, and you're the only one doing it in such a no bullshit way. I love it
@StingSting844
@StingSting844 4 ай бұрын
Great vid papa jack ,👏
@ilkou
@ilkou 4 ай бұрын
u can use react compiler with react 18?!! in the docs they said u have to use 19 !
@jherr
@jherr 4 ай бұрын
Nope. It works with 18. medium.com/@jherr2020/react-compiler-with-react-18-1e39f60ae71a
@ilkou
@ilkou 4 ай бұрын
@@jherr this is super cool thank youuu 🙌🏼🙌🏼🙌🏼
@yashsolanki069
@yashsolanki069 4 ай бұрын
Hi Jack, just like caching is by default off now. Do you think it would have been a better experience to keep component as Client side rendering by default?
@jherr
@jherr 3 ай бұрын
That's an interesting point. I think that ship has sailed though. I don't think they could make that change and keep backward compatibility.
@yashsolanki069
@yashsolanki069 3 ай бұрын
@@jherr you're right. It's already the second version after the introduction from v13 so there is no going back. I'll surely go through some of your videos to get a deeper understanding on this. Thanks, Yash
@webologixmy
@webologixmy 4 ай бұрын
After Use Case? is after something like I want the page view field to be incremented. This is really not part of page per say. ???
@jherr
@jherr 4 ай бұрын
Ok. That’s a good case. I haven’t seen a page views thing in a while!
@gerkim3046
@gerkim3046 4 ай бұрын
@@jherr also analytics or internal error reporting. the user can already get the response and the server can proceed to report the error or send analytics without the user having to wait
@Ss-zg3yj
@Ss-zg3yj Ай бұрын
I've encountered multiple issues with broken styles in prod when used Turbo for dev, so not recommend, until they cover 100% for production build.
@joseandkris
@joseandkris 4 ай бұрын
Great video Jack ❤
@jordymaryns4945
@jordymaryns4945 4 ай бұрын
Just to clarify they do not think Turbopack is ready for production. Only the dev test pass.
@furycorp
@furycorp 4 ай бұрын
I stopped using turbo + nx and now go exclusively pnpm workspaces for monorepo and it is so much smoother sailing, updates, less troubleshooting, less to go wrong, no surprises when you update...
@saurabh75prakash
@saurabh75prakash 4 ай бұрын
Must watch for any React dev.
@haack79
@haack79 4 ай бұрын
i think they say after is good for things that shouldn’t block the response such as logging and metrics?
@jherr
@jherr 4 ай бұрын
Good one!
@shanehoban
@shanehoban 3 ай бұрын
The after is useful for API routes that can return data to the user, and continue to do perhaps more DB updates etc. or kick off another process. On the FE it's probably not all that useful tbh** edit: Not possible to use after on FE/client side, ignore that.
@jherr
@jherr 3 ай бұрын
Well, if by FE you mean if your NextJS server is just serving the FE and not providing microservices, then I might agree. If you mean on the client, then it doesn't run there, it's server only.
@shanehoban
@shanehoban 3 ай бұрын
@@jherr Oh that's an oversight on my end, I hadn't tried to use it client side but just thought it might work too for some reason. Ignore that!
@romansernato6526
@romansernato6526 4 ай бұрын
just updated a next14 project to the v15 and all works fine even react compiler does
@jherr
@jherr 4 ай бұрын
I'd watch out for the cache changes. If caching was something you needed for perf reasons you'll want to make sure that still works. If caching was more of a hassle, then you should be fine.
@romansernato6526
@romansernato6526 4 ай бұрын
​@@jherr Hi Jack, right now I have a couple of points temporarily in the 'no-cache' mode, I guess this shouldn't be a problem with the new relaxed caching anyway. One more cool thing is, as you've mentioned, apart from instead of the useFormState now is the useActionState, you can now import isPending directly from the useActionState and there's no need to have the submit button in a separate component along with the useFormStatus altogether, how cool is that?)) Let's now look forward to the turbo for the "build" mode)
@jherr
@jherr 4 ай бұрын
@@romansernato6526 Well spoken my friend! Definitely looking forward to updating my form stuff with useActionState. I'm so, so, so tired of form issues.
@romansernato6526
@romansernato6526 4 ай бұрын
@@jherr works like magic now, I personally do not see any reasons why to use anything but server-actions with forms, you can validate it inside the action, return results or validation errors if needed, no more weird stuff on the frontend)
@luongkhovlogs471
@luongkhovlogs471 4 ай бұрын
What command line are you using?
@jherr
@jherr 4 ай бұрын
I use iTerm or Tabby (moving back to iTerm now) with oh-my-zsh and oh-my-posh.
@luongkhovlogs471
@luongkhovlogs471 4 ай бұрын
​@@jherr thanks you
@antwansherif
@antwansherif 4 ай бұрын
I think after could be useful for analytics
@SmoothNanners
@SmoothNanners 4 ай бұрын
Can babel-plugin-react-compiler be a dev dependency or is it needed in runtime? Also, do you know if they'll be updating eslint-config-next to support eslint 9 and flat config?
@jherr
@jherr 4 ай бұрын
Wondered that myself. I was going to use -D but then I looked at the docs and they didn't, so I stuck with that. Not sure about eslint, but most likely.
@SmoothNanners
@SmoothNanners 4 ай бұрын
@@jherr Just tested a next build with it in and not in dev dependencies, clearing node_modules & "pnpm i -P", and it appears to work and run as expected, as the component render box doesn't appear. I think the babel transformations are likely applied during dev and build compilation, but it's hard to be sure since next build works without other things like react-dom sometimes.
@jherr
@jherr 4 ай бұрын
@@SmoothNanners Cool. Thanks for looking into that.
@chrisr2063
@chrisr2063 3 ай бұрын
the boilerplate annoyed the heck out of me too. glad its smaller now.
@jacquesrosondil
@jacquesrosondil 4 ай бұрын
When it comes to “meta” tags being “hoisted” into the head, does it differ that much from implementations like react-helmet? In my opinion, the pattern is actually rather complex. It’s in effect a side effect in the DOM you have to manage. It’s easy to create accidental race conditions and leave the title with an incorrect value. It’s how people have been using head content for almost as long as React has existed so it makes sense to adopt it into the core of react. Still feels like the pattern would need some work from a DX perspective.
@jherr
@jherr 4 ай бұрын
It's basically helmet in the core. I don't really see the issue there with complexity. It seems less complex to me. But generateMetadata still works, so just stick with that if you don't like it.
@coder_one
@coder_one 4 ай бұрын
Vercel is now like a video game console producer with the rights to an exclusive title: React.js from the Meta inc. And that's disgustingly sad!
@siphamandlambokazi331
@siphamandlambokazi331 4 ай бұрын
My God, Jack, I was just wrapping up my e-commerce project on nexjt14, now I need to upgrade😢
@jherr
@jherr 4 ай бұрын
oh-my-posh on Tabby using JetBrains Mono NF at super big sizes. FWIW, I'm moving off of Tabby onto iTerm.
@ashatron656
@ashatron656 4 ай бұрын
For real, Jack is a low key hottie. More like "Jack Heart-throb-ton" amirite
@romansernato6526
@romansernato6526 4 ай бұрын
oh boy
@danielratiu4318
@danielratiu4318 4 ай бұрын
Hmm, not being able to have api only routes in nextjs is not ideal. Why not? If you need some processing stuff to happen you need to invest time learning and maintaining other tech as well.
@jherr
@jherr 4 ай бұрын
API routes are fine. It's calling its own API routes from its own page routes that's the problem. You should just call whatever the API route is calling from the page route. It saves the HTTP negotiation and TCP/IP loopback.
@GurbyTheGreat
@GurbyTheGreat 4 ай бұрын
Vercel can't be trusted
@captainnoyaux
@captainnoyaux 4 ай бұрын
Why ?
@underflowexception
@underflowexception 4 ай бұрын
Breaking changes every other day
@marsahere2621
@marsahere2621 4 ай бұрын
Ok
@jherr
@jherr 4 ай бұрын
Except that none of this was really a breaking change unless you relied on the caching. I'm not a shill for Next/Vercel, but "every other day" is a stretch. There are breaking changes. But, in my experience, it hasn't been that terrible.
@simpingsyndrome
@simpingsyndrome 4 ай бұрын
Now my skill on Next 14 is being deprecated
@ToB1ue
@ToB1ue 4 ай бұрын
If just middleware would not be artificially constrained to the edge runtime…
@ToB1ue
@ToB1ue 4 ай бұрын
…and if if just server actions wouldn’t queue when being called - then I’d be excited for this stuff.
@jherr
@jherr 4 ай бұрын
The server actions qeueing is an odd one. I missed the chance to talk to someone from the React core team about that one. I'm pretty sure it's a core issue since actions are in the core.
@ToB1ue
@ToB1ue 4 ай бұрын
@@jherr Probably. It is just incredibly limiting (and frustrating) at times, so I hope to see those two things changed.
@bob_kazamakis
@bob_kazamakis 4 ай бұрын
Ew. Vercel
@RegalWK
@RegalWK 4 ай бұрын
Great video!
@RegalWK
@RegalWK 4 ай бұрын
The cache not working as expected on page.tsx is because all page are SSG by default, you have to make them client components or tell them to be dynamic I guess, not sure if bug
@jherr
@jherr 4 ай бұрын
A fetch on pagel.tsx _should_ make it dynamic. It's not doing that right now. So I think there is an issue there. There is also something going on with Tailwind. I think there are a few bugs to work out.
I HACKED ShadCN to Create Insane React Templates and Installers
14:59
Jack Herrington
Рет қаралды 8 М.
Next.js 15 Is Here (Vercel Ship Breakdown)
19:34
Theo - t3․gg
Рет қаралды 100 М.
My daughter is creative when it comes to eating food #funny #comedy #cute #baby#smart girl
00:17
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 51 МЛН
Finally Fix Your Issues With JS/React Memory Management 😤
20:13
Jack Herrington
Рет қаралды 85 М.
Big Suspense Changes in React 19: Explained In Code
17:31
Jack Herrington
Рет қаралды 26 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 214 М.
What is Hydration
7:16
Builder
Рет қаралды 19 М.
Every React 19 Feature Explained in 8 Minutes
7:35
Code Bootcamp
Рет қаралды 128 М.
React Compiler: In-Depth Beyond React Conf 2024
15:16
Jack Herrington
Рет қаралды 78 М.
Vites Fatal Flaw Fixed With Vinxi
11:23
Jack Herrington
Рет қаралды 16 М.
I DONT USE NEXT JS
54:01
ThePrimeTime
Рет қаралды 359 М.
I Was Surprised How Next.js Cached My Server Components
15:04
James Q Quick
Рет қаралды 3,2 М.
Testing in .NET is About to Change
12:54
Nick Chapsas
Рет қаралды 56 М.
My daughter is creative when it comes to eating food #funny #comedy #cute #baby#smart girl
00:17