The things Vercel won't show you (Theo Browne)

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Presented at Next.js Conf 2023.
    View all talks from the conference: • Next.js Conf 2023 - In...
    Explore templates of sites built with Next.js: vercel.fyi/ver...
    Check out the Vercel product tour: vercel.fyi/pro...
    Next.js is great. So is Vercel. We've spent the last few hours hearing all about how to use these things correctly. I'm going to show you how to use them incorrectly

КОМЕНТАРІ • 26

  • @tabletuser123
    @tabletuser123 11 місяців тому +43

    The things Vercel wont show you (Theo Browne), presented by Vercel

  • @TomNook.
    @TomNook. 11 місяців тому +61

    Shame we didn't have Theo on stage

    • @t3dotgg
      @t3dotgg 11 місяців тому +18

      I had the option but I wanted to do the stream from the venue instead 🙏

    • @parlor3115
      @parlor3115 11 місяців тому +1

      Let's be thankful he didn't 🙏

    • @MrStupiuno
      @MrStupiuno 11 місяців тому +1

      What would he do besides “give hot takes and clickbait content”? No thanks

  • @maciejziehlke4479
    @maciejziehlke4479 11 місяців тому +4

    1:06 and that comment "this tells Remix to use the server environment" :)

  • @serhiimamedov
    @serhiimamedov 11 місяців тому +5

    First one is not curced at all. It should be in the official docs

  • @yomaru_1999
    @yomaru_1999 11 місяців тому +3

    Ways to write unmanageable code. Thx Vercel.

  • @gnarusg8708
    @gnarusg8708 11 місяців тому +8

    Generator seems very nice for streaming an llm response.

    • @guillemgarcia3630
      @guillemgarcia3630 11 місяців тому

      As far as I know, you would get a really big suspense tree right? So it might not be performant

    • @gerardmarquinarubio9492
      @gerardmarquinarubio9492 11 місяців тому

      ​@@guillemgarcia3630i don't think so right? The if condition returns the value in the generatorcomponent which is just a plain old JSX component, and then that is used to render a single suspense in the fallback. I don't think the inner generatorcomponent is ever truly rendered, I think it is used solely to trigger the next iteration of the generator. (Haven't tested though)

    • @tspander
      @tspander 11 місяців тому

      The solution with recursive suspense is actually shown in the vercel/ai docs for rendering the LLM response in a server component. So it is at least somewhat official

  • @asimshamim113
    @asimshamim113 11 місяців тому +9

    the commitment to click bait titles from this dude is almost impressive

  • @arish_shah
    @arish_shah 11 місяців тому +1

    The third pattern is genuinely so cursed lol.

  • @OybekDaniyarov
    @OybekDaniyarov 11 місяців тому +2

    globalThis feels like php $GLOBALS 😅

  • @StingSting844
    @StingSting844 11 місяців тому

    Shouldnt the loadMore function have a "use server" directive in it to be compiled into an RPC?

  • @elvispalace
    @elvispalace 11 місяців тому +1

    wait

  • @RaducuGabriel
    @RaducuGabriel 11 місяців тому

    generators for queue messages

  • @agbimpod
    @agbimpod 11 місяців тому

    but can we unit test them

  • @TheIpicon
    @TheIpicon 11 місяців тому +2

    Theo 😍

  • @croakgrogan
    @croakgrogan 11 місяців тому +1

    These all seem extremely problematic imo. Maybe I’m too much of a purist but I don’t think I’d feel comfortable stepping outside the walls of a framework for production apps. At some point, some of this stuff is going to break as part of a NextJS update and if you’re leveraging things like this heavily in your app, you’re suddenly going to have a lot of broken code to deal with.

    • @zyrphath
      @zyrphath 11 місяців тому +3

      Well he did say repeatedly that these patterns are cursed and not blessed by Vercel ... did you for some reason expect production-stable code from that?

    • @case6339
      @case6339 11 місяців тому

      The globalThis and script dangerouslyinnerhtml one is in production code at Theo's own commercial project as he stated in this video.@@zyrphath