Data Flow in Svelte 5 | How to fetch & pass data from the backend to the frontend in SvelteKit

preview_player
Показать описание
🔥 Master data flow in Svelte 5! In this tutorial, I’ll guide you through creating dynamic routes in SvelteKit—perfect for setting up blog pages or other content-driven sites. Learn how to fetch data from the backend, pass it to the frontend, and utilize Svelte’s intelligent prefetching for a seamless user experience.

Finished Code here:

⭐ What you’ll learn:
• Setting up dynamic routes in SvelteKit
• Fetching and passing data from backend to frontend
• How Svelte intelligently prefetches data to improve UX

💡 Check out my comprehensive course: “Master Svelte 5 & SvelteKit – Build & Deploy Real-World Apps” -
🚨Discount with the following link 🚨:

#Svelte5 #WebDevelopment #JavaScript #SvelteKit #Programming
Рекомендации по теме
Комментарии
Автор

Completely forgot to plug my udemy course on Svelte 5 in the video. If you like my teaching style, you'll find it in the description though :)

Niklas-Fischer
Автор

This is a great video. Your explanation of the load function is fantastic, and the prefetch aroused my interest.

CryptxAC
Автор

WHAT A AMAZING VIDEO!!! THIS IS WHAT I NEEDED. THANK YOU!!

oOeftichisOo
Автор

Liked and subbed, love how you're just typing out what you're doing but with the code syntax. That's also how I learn new code concepts. Makes it so much easier to understand the HOW (skeleton structure), WHAT (typing out flow), WHEN (explanation of how structure and logic relate), WHERE (the low level code blocks). This gives us a nice and simple picture of how to structure it all and the end to end flow. <3

biqnoob
Автор

Really great, short, straight to the point explanation, thanks.

Diewux
Автор

well explained and really good for beginners.

franklinsecretario
Автор

You are just awesome. CRISP and CLEAR. Thank you!!!👏👏👏

hemantjoon
Автор

Extra rich content +12:00. Thanks to share it!

CarlosLeon-iifs
Автор

What if my links depends on the value of an input element, then i hover on the link and it calls the Load function, then i make a change to the input value and i hover on the link again. Will the Load function be called again?

jameseze
Автор

Such a good video. I needed this. Loved your explanation ❤

tejxsmore
Автор

Great job on the explanation and video.

bikerd
Автор

Thank you! Your explanation was awesome. Please create more SvelteKit tutorials!

BRODZELi
Автор

Keep doing Svelte content! It's great!

friendly__drone
Автор

I will buy your course i want to know does your course is all of in svelte 5 version?

Nisarsafi
Автор

Great video. I would argue that in your case making it server side makes more sense as if the user has no internet, the client won't be able to fetch the thing anyway. Server side is always more secure and works good as much as client side fetch would.

gageracer
Автор

Question: so if the code is running twice, are we calling any API (used in that page.ts) twice too? So are we wasting API calls/money?

alejandrofanjul
Автор

One thing about load function is we can not reuse that if we change some condition (p. Ex user has selected something)

rogeriocf
Автор

I think it's useful to make a video about set/getContext, state, cookies/sessions in connection with the Load function.

EliSpizzichino
Автор

In your point of view... Would you opt for using load function always unless otherwise serverload Function is needed?

D_bugit
Автор

I think you forgot to mention that if you structure your application's frontend with API endpoint that does the "secret"/backend stuff, you can then use page.ts's Load function to load data in. Am I correct?

EliSpizzichino
welcome to shbcf.ru