We're not supposed to know about this yet 🤐
Вставка
- Опубліковано 21 жов 2024
- I’m so hyped I decided to dig into the Next.js github repo, I found soke very fun new things :)
Check out my Twitch, Twitter, Discord more at t3.gg
S/O Ph4seOn3 for the awesome edit 🙏
Is there a "use cash" feature? Because I could use some cash.
Nah, that's for PHP devs.
@@noobnessmee actually 😅
"use lambo";
c++ std library has a get_money function
You must be a front-end developer
reverse engineering an open source
Couldn't agree more. Next cache is really confusing sometimes or too opinionated, maybe. Idk. I'm letting the initial code without any cache config and fixing it as needed down the road.
Why we need so much abstraction for just a simple Cache-Control header.
Cache-Control: max-age=10, stale-while-revalidate=20
Does after all this abstraction NextJS generate Cache-Control header like above that can be used by all CDN or some vercel specific magic 🪄.
For on demand revaldation we should be able to declare our own revalidate function where we can send a API request to the CDN provider we are using to delete the cache. It will allow self host it without missing stale-while-revalidate feature.
theo intro is outdated now :( NextJs isn't quiet anymore, 15 is stable alr
Is it just me or does it seem like JS directives are being abused here?
Maybe I'm missing something, but this "API" feels incredibly janky and in my opinion is likely indicative of an overall design flaw.
Pretty much every js framework abuses js syntax or just straight up adds new syntax or AST transformers to achieve what they want.
I wish one of them would go all out and just make a new programming language already that's heavily based on js but actually has first-class support for the features they wanna add like components or reactive state. React came closest with jsx but it's still very half-baked because it's just sugar for createElement(element,props,children)
Couldn’t agree more. This is getting absurd already
@@pokefreak2112 I'm not sure how active the development is, but I remember mint-lang was basically that, React concepts baked into a pretty declarative language.
In any case, at the end of the day it's gonna be sugar for JS or sugar for WASM. The tricky part is making sure all the sugar is "standard" and works well in the language, and, well, random magic strings are probably not really great. It'd be nicer to have some sort of Next context object that you can set a flag to or call a method on, so then you didn't need a custom build step. But anyway... ship's sailed I guess.
@@pokefreak2112 See Flow. It has a component type and render type specifies. If you think creating a language is a good solution to what some people consider "bad API", then you're off the mark.
@@pokefreak2112 svelte pretty much
Guillermo doing a commit named “founder mode” on a demo app that is not even of a todolist complexity is sooooo cringe. Almost as cringe as Theo saying he is “leaking” and “reverse engineering” nexjs. And not as cringe as Vercel thinking that having less caching code is the way to fix the fact that they gave us not enough control.
>reverse engineering
> j*vascript
pick one
If Lee Rob talks about it , is that really 'leaking?'
Pretty great to see this. Finally they got caching right, you tell it where and how to cache something and it just does.
I just hope there will be an eslint plugin to warn you of the things that error out in build, wouldn't mind getting a warning in the editor instead of waiting a few minutes just to get a 'pipeline failed' on github.
Also great to see the cached async function at 24:20, We can just make a function, return some JSX, and it all just works. Getting closer and closer to Dan Abramov's "just copy the code from client and paste it on the server"
Now just waiting for GET server actions/functions and we'll be golden!
Next time they try to hide something they need to try harder
the dev rel guy, 'LEAKED' it
I think they know what they’re doing. They might not care or do it on purpose even? It gives some media buzz and people are more tolerant to bugs. Or what do you think?
nextjs 15 soon hopefully really good
i love your videos man
let's pray that they can make it this time
It's launched today
it was launched 10 hours ago lol
@@OP-ig1fj i know bro i commented and saw it lol
i'lll try it tomorrow
Getting really into remix. There's a lot I don't like, but everything I don't like about remix is exactly the same things that I don't like about the app router in next.js.
Although, this video highlights one of the exceptions.
Time to look into Tanstack Start
Remix docs sucks
@@noobnessmee yes. Yes they do. Maybe if I reread them again...
I'm a fan of remix, but the lack of middleware is a nonstarter for me. So much copy-paste is required for simple things like authenticated route paths.
@@bruceleeharrison9284 Right now I'm just doing research. I'm trying to port our next.js app that makes heavy use of swr to see how that compares to porting the same project to the page router.
Likely we'll keep using Next.js and the page router for a while, but it's fun to learn new things.
It's wild that they didn't do this from the start. Opt-in to caching, do not cache by default - and also differently in dev/prod. No wonder there was a lot of confused and annoyed developers.
Didn’t next 15 just get released and now cache is not default
I'm super super stoked about Next 15
It's marked as stable now!!!
@@mathesonstep it's marked as stable, but it is really stable?
so you reverse engineered open source code that's publicly available? 🤔 I don't think that's what reverse engineering means
Every time I heard "caching is hard" from other devs I was like "phew, you're overestimating it"...
...Then I implemented adaptive replacement cache for a filesystem one day and realised how annoying this thing is.
Luckily I live in the EU where we don't have software patents, so I was free to just looked up a few US patents for filesystem caching, blatantly steal their ideas and figure out a good middleground.
Could you make more videos on reverse engineering? It really helps newcomers to the ecosystem grasp things more easily!
15 already shipped :)
Im the only person who likes the new version? I like the stability versions, and this version improves a lot things requested by developers
I don't want to use nextjs anymore. because it has a big difference between development and production behavior
and it's also pretty tightly bound to the vercel platform
"use suspense" incoming.
The thumbnail shots remind me of Lucille Ball
How does one reverse-engineer open-source code?
I hope that the directive to enable this new feature is "use \"use cache\""
not caching during dev is the most confusing to me
especially when working with external APIs that have rather strict request limit
guys just check the web sometimes, nextjs 15 is out.
I appreciate you!
No mention or comparison with Tanstack Start?
But wait, if you aren't allowed to use headers in a 'use cache', then how do you add a cache tag based on the header values?
I don’t think they are quiet while literally they released yesterday
Nothing I discuss here is in the 15 release notes :)
Hey Theo there is a typo in this uploads description.
soke
Imagine reacting (ie content stealing) from a smaller channel and then trying to bully them when they ask you to stop stealing from them.
Who's the other channel?
@@danielchettiar5670 The theft victim? Honeypot.
Sick.
This doesn't solve caching when you're running multiple instances of the site.
AFAIK, it does as long as you are on Vercel
@@nwsome yeah I mean vercel manages all of that for you anyways right?
Big changes again? 😅
Is that still in the "front end" domain ?
Thank god I use nuxt 😂
i enjoyed it
U A/B testing thumbnails I've gotten 4 different ones
next is a mess (- _ - )
Awesome video!
Theo, if it's not sensitive data, localStorage is def ok right? please say yes bro my entire framework uses it XD
sorry bro, time to rewrite your whole framework
@@pielily bro that’s a no comment comment… you can’t just piss an answer like that in the wind lol give some reasoning
Nah its fine, as long as they dont directly change how your backend behaves.
they are only used by your frontend side maybe for some visuals, like managing the site theme or language, thats what I usually use them for
@@adamiscool1118 yea thats what I am using it for and cache non sensitive html (which is always sanitized using DOMPurify) view configs, because ultimately anything in the client is accessible no matter what so I came up with a way to cache state between history it’s pretty slick
also working on a server side version of it via unique key VM instances (for sensitive data responses) and it’s a dynamic router
lol, invalidate this video
😂😂😂 consider browser caching 😅😅😅
Oof. At 5:30 nobody told Theo that js is perfectly fine and is in general preferred over the jsx extension. Tsx is inescapable and most likely, Theo 's just been in TS land for so long that he assumed the same applies for vanilla js. This is the most charitable viewing of Theo's response I can come up with without doing crazy mental gymnastics
Most IDEs will not recognize JSX syntax if its not in a .jsx file. I dont know how you did these mental gymmastics
react 🤮
first
first?
let's get an ai agent monitor their github commits 😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅