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 🙏

КОМЕНТАРІ • 96

  • @seanmills3502
    @seanmills3502 12 годин тому +192

    Is there a "use cash" feature? Because I could use some cash.

  • @hl7297
    @hl7297 11 годин тому +31

    reverse engineering an open source

  • @Roacoelho
    @Roacoelho 13 годин тому +21

    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.

  • @akashdeepdas6782
    @akashdeepdas6782 11 годин тому +13

    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.

  • @theBarracuda_
    @theBarracuda_ 13 годин тому +18

    theo intro is outdated now :( NextJs isn't quiet anymore, 15 is stable alr

  • @tryitpro674
    @tryitpro674 12 годин тому +33

    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.

    • @pokefreak2112
      @pokefreak2112 9 годин тому +2

      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)

    • @JonathanRose24
      @JonathanRose24 9 годин тому +1

      Couldn’t agree more. This is getting absurd already

    • @ceigey-au
      @ceigey-au 5 годин тому +1

      @@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.

    • @dealloc
      @dealloc 4 години тому

      @@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.

    • @yojou3695
      @yojou3695 3 години тому

      ​@@pokefreak2112 svelte pretty much

  • @MrManafon
    @MrManafon 9 годин тому +13

    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.

    • @realmimak
      @realmimak 5 годин тому +2

      >reverse engineering
      > j*vascript
      pick one

  • @alastairtheduke
    @alastairtheduke 11 годин тому +6

    If Lee Rob talks about it , is that really 'leaking?'

  • @helleye311
    @helleye311 4 години тому

    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!

  • @samuelgunter
    @samuelgunter 13 годин тому +11

    Next time they try to hide something they need to try harder

    • @alastairtheduke
      @alastairtheduke 11 годин тому +1

      the dev rel guy, 'LEAKED' it

    • @frowin2
      @frowin2 6 годин тому

      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?

  • @abdulwadoodzawity9523
    @abdulwadoodzawity9523 13 годин тому +8

    nextjs 15 soon hopefully really good
    i love your videos man

    • @dopetag
      @dopetag 13 годин тому +1

      let's pray that they can make it this time

    • @tusharjain9701
      @tusharjain9701 10 годин тому

      It's launched today

    • @OP-ig1fj
      @OP-ig1fj 10 годин тому

      it was launched 10 hours ago lol

    • @abdulwadoodzawity9523
      @abdulwadoodzawity9523 7 годин тому

      @@OP-ig1fj i know bro i commented and saw it lol
      i'lll try it tomorrow

  • @edwardallenthree
    @edwardallenthree 12 годин тому +6

    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.

    • @Mmk-dn1fi
      @Mmk-dn1fi 11 годин тому

      Time to look into Tanstack Start

    • @noobnessmee
      @noobnessmee 11 годин тому +3

      Remix docs sucks

    • @edwardallenthree
      @edwardallenthree 10 годин тому

      @@noobnessmee yes. Yes they do. Maybe if I reread them again...

    • @bruceleeharrison9284
      @bruceleeharrison9284 10 годин тому

      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.

    • @edwardallenthree
      @edwardallenthree 10 годин тому

      @@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.

  • @ljuglampa
    @ljuglampa 7 годин тому

    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.

  • @captainlennysub
    @captainlennysub 8 годин тому +2

    Didn’t next 15 just get released and now cache is not default

  • @lynxcat4life
    @lynxcat4life 13 годин тому +2

    I'm super super stoked about Next 15

    • @mathesonstep
      @mathesonstep 13 годин тому +1

      It's marked as stable now!!!

    • @developer217
      @developer217 6 годин тому +1

      @@mathesonstep it's marked as stable, but it is really stable?

  • @denespapp1963
    @denespapp1963 5 годин тому +3

    so you reverse engineered open source code that's publicly available? 🤔 I don't think that's what reverse engineering means

  • @shapelessed
    @shapelessed 4 години тому

    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.

  • @_aNeaire
    @_aNeaire 10 годин тому

    Could you make more videos on reverse engineering? It really helps newcomers to the ecosystem grasp things more easily!

  • @viktor6726
    @viktor6726 13 годин тому +3

    15 already shipped :)

  • @rubiglam
    @rubiglam 2 години тому

    Im the only person who likes the new version? I like the stability versions, and this version improves a lot things requested by developers

  • @snatvb
    @snatvb 3 години тому

    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

  • @ivan.jeremic
    @ivan.jeremic 10 годин тому

    "use suspense" incoming.

  • @randy918
    @randy918 11 годин тому

    The thumbnail shots remind me of Lucille Ball

  • @bruno3
    @bruno3 5 годин тому +2

    How does one reverse-engineer open-source code?

  • @zwanz0r
    @zwanz0r 10 годин тому

    I hope that the directive to enable this new feature is "use \"use cache\""

  • @bkohnen
    @bkohnen 5 годин тому

    not caching during dev is the most confusing to me
    especially when working with external APIs that have rather strict request limit

  • @OP-ig1fj
    @OP-ig1fj 10 годин тому

    guys just check the web sometimes, nextjs 15 is out.

  • @dannyisrael
    @dannyisrael 10 годин тому

    I appreciate you!

  • @Mmk-dn1fi
    @Mmk-dn1fi 11 годин тому

    No mention or comparison with Tanstack Start?

  • @rikschaaf
    @rikschaaf 5 годин тому

    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?

  • @mandarliev
    @mandarliev 3 години тому

    I don’t think they are quiet while literally they released yesterday

    • @t3dotgg
      @t3dotgg  3 години тому

      Nothing I discuss here is in the 15 release notes :)

  • @yeetdatcodeboi
    @yeetdatcodeboi 6 годин тому

    Hey Theo there is a typo in this uploads description.

  • @minikame2272
    @minikame2272 8 годин тому

    soke

  • @dm2060
    @dm2060 11 годин тому +3

    Imagine reacting (ie content stealing) from a smaller channel and then trying to bully them when they ask you to stop stealing from them.

    • @danielchettiar5670
      @danielchettiar5670 7 годин тому +2

      Who's the other channel?

    • @dm2060
      @dm2060 3 години тому

      @@danielchettiar5670 The theft victim? Honeypot.

  • @scrambled_greg
    @scrambled_greg 12 годин тому

    Sick.

  • @tylerthomas6932
    @tylerthomas6932 9 годин тому

    This doesn't solve caching when you're running multiple instances of the site.

    • @nwsome
      @nwsome 9 годин тому

      AFAIK, it does as long as you are on Vercel

    • @tylerthomas6932
      @tylerthomas6932 7 годин тому

      @@nwsome yeah I mean vercel manages all of that for you anyways right?

  • @md6886
    @md6886 9 годин тому +1

    Big changes again? 😅

  • @desLunes
    @desLunes 9 годин тому

    Is that still in the "front end" domain ?

  • @pixiedev
    @pixiedev 9 годин тому +1

    Thank god I use nuxt 😂

  • @aymenbachiri-yh2hd
    @aymenbachiri-yh2hd 5 годин тому

    i enjoyed it

  • @succatash
    @succatash 9 годин тому

    U A/B testing thumbnails I've gotten 4 different ones

  • @qwerty-or1yg
    @qwerty-or1yg 10 годин тому

    next is a mess (- _ - )

  • @MsGuimmy
    @MsGuimmy 4 години тому

    Awesome video!

  • @aiamfree
    @aiamfree 11 годин тому

    Theo, if it's not sensitive data, localStorage is def ok right? please say yes bro my entire framework uses it XD

    • @pielily
      @pielily 10 годин тому

      sorry bro, time to rewrite your whole framework

    • @aiamfree
      @aiamfree 10 годин тому +1

      @@pielily bro that’s a no comment comment… you can’t just piss an answer like that in the wind lol give some reasoning

    • @adamiscool1118
      @adamiscool1118 3 години тому

      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

    • @aiamfree
      @aiamfree 2 години тому

      @@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

    • @aiamfree
      @aiamfree 2 години тому

      also working on a server side version of it via unique key VM instances (for sensitive data responses) and it’s a dynamic router

  • @additionaddict5524
    @additionaddict5524 12 годин тому +3

    lol, invalidate this video

  • @franklemanschik_de
    @franklemanschik_de 11 годин тому

    😂😂😂 consider browser caching 😅😅😅

  • @poulticegeist
    @poulticegeist 11 годин тому +1

    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

    • @LeonMarzahn-t6n
      @LeonMarzahn-t6n 3 години тому

      Most IDEs will not recognize JSX syntax if its not in a .jsx file. I dont know how you did these mental gymmastics

  • @cckeysify
    @cckeysify 7 годин тому

    react 🤮

  • @_briantravis
    @_briantravis 13 годин тому +1

    first

  • @pencilcheck
    @pencilcheck 13 годин тому

    first?

  • @robrita
    @robrita 13 годин тому +3

    let's get an ai agent monitor their github commits 😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅