Sveltekit Data Fetching in 2024 Explained

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

Комментарии • 17

  • @bmdavis419
    @bmdavis419  Месяц назад +16

    Some important notes from ruclips.net/user/StanislavKhromov:
    - When using +page.ts to fetch from a public service you need to make it accessible both from the server (via Node.js fetch) and the client (by configuring CORS).
    - Load functions run concurrently unless you "await parent()", don't think it was mentioned but has a big implication on the available data
    - $effect is not equivalent to onMount, and onMount is not deprecated. If you do $effect and then untrack(..) everything inside it, it behaves like onMount. (because onMount never reruns)
    - There is no caching of fetch. If you use Kit fetch in a .server file, you will get the inlined response in the SSR as a JSON blob. If you use Kit fetch in universal load, you will get the inlined Response object from the fetch you called on the server, which dedupes it from running again when page loads the second time in the browser.

  • @thompson_ian
    @thompson_ian Месяц назад +18

    Could you do an in-depth video on error handling within svelte kit? Specifically using Supabase? This is one area I’m struggling to find great resources on

    • @xzaviorbrough9362
      @xzaviorbrough9362 Месяц назад

      Honestly bro Chatgpt be helping a lot especially with indepth question and acting as a error problem solver

  • @rogerpence
    @rogerpence 12 дней назад

    This is a superb video, Ben. Thank you. (Great on Theo's channel the other day, too)

  • @AxelRock
    @AxelRock Месяц назад +4

    I knew all of this, but watched the video anyway, I just think it's so elegant and powerful, that I don't mind re-watching someone explaining it.

  • @mihaiandrei434
    @mihaiandrei434 Месяц назад +1

    Awesome channel for svelte 😬. Thank you for sharing!

  • @pjc825
    @pjc825 Месяц назад

    Please do a video like this covering the proper use of stores and the context API using the latest rune implementations that will ensure state is not intermingled when you have multiple independent users of an application accessing data server side. You even mentioned in one of your older videos that you where not handling this incorrectly. I nice clear guide to the proper/correct way to implement this functionality would be greatly appreciated 💯🙂👍

  • @yash7630
    @yash7630 Месяц назад

    Would love that Hono video you mentioned

  • @khantseithu
    @khantseithu 24 дня назад +1

    this is gold, thanks ben

  • @DunckingTest
    @DunckingTest Месяц назад

    Hey, nice video. I have a video request if you don't mind, i would like you to do a video about all the libraries you use in your production svelte kit apps

  • @mdriaz5334
    @mdriaz5334 Месяц назад

    Would be better if CSR mode data showing best practices are also shown in any video...🎉

  • @aviorperetz6307
    @aviorperetz6307 Месяц назад

    It seems the best and funniest ui framework on the planet

  • @rahulagarwal968
    @rahulagarwal968 Месяц назад

    What are your views on Kotlin Multiplatform ? Should I learn Flutter or KMP

  • @RowdyVerbeek
    @RowdyVerbeek Месяц назад

    Great Video!

  • @bossRODTV
    @bossRODTV Месяц назад

    Hey Ben, awesome video 🎉 I just wanted to ask what is the reason why do you need to have both page.ts and page.server.ts?

  • @prashlovessamosa
    @prashlovessamosa Месяц назад +1

    hey ben can you please make some sort of sveltikit crash course consist every major topic to build any web app.

  • @einl12345
    @einl12345 Месяц назад

    Great, thanks! :)