Deep dive into the code behind Napkins - Wireframe to Code app

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 12

  • @HassanElMghari
    @HassanElMghari 3 місяці тому +1

    Thanks for making this video, Elie!

    • @elie2222
      @elie2222  3 місяці тому

      Thanks for putting the demo together 💪

  • @trends_vc
    @trends_vc 3 місяці тому +1

    Great vid. Thanks for sharing Elie

  • @priyankrajai
    @priyankrajai 3 місяці тому +1

    Great video Elie ❤

  • @starlord7526
    @starlord7526 3 місяці тому +2

    do you mind creating a tutorial on streams on the frontend? I cant seem to find good enough content on it. For the backend, using node, there are enough but not on the front part

    • @elie2222
      @elie2222  3 місяці тому

      Yup. I missed that in the video. Think I may have covered the concept in some older videos.
      But basically, the response is streamed in here:
      github.com/Nutlope/napkins/blob/main/app/page.tsx#L87-L89
      And we call setState on each chunk.
      And the main work is in readStream which is an async generator function:
      github.com/Nutlope/napkins/blob/main/lib/utils.ts
      You can also use libraries like vercel/ai that give you hooks to handle this.

    • @mihaelisaev
      @mihaelisaev 3 місяці тому

      "streams on the frontend" - what's that?

    • @starlord7526
      @starlord7526 3 місяці тому

      @@mihaelisaev readable, writable, transofrm stream stuff. I have gone through almost every nutlope's codebases and everywhere he uses streams to render the llm response on frontend

  • @starlord7526
    @starlord7526 3 місяці тому +1

    I was just going through the project

    • @elie2222
      @elie2222  3 місяці тому

      hope this helped you! any other projects you're interested in right now?