SvelteKit | [slug]
ฝัง
- เผยแพร่เมื่อ 8 ก.ย. 2024
- This is a short video giving a clear example of how to setup dynamic routing in SvelteKit. I show the folder structure for setting up dynamic routes, how to access the params in your load function to return the slug ( you can also use it to hit an endpoint for more data fyi). I also show how to setup your links for dynamic routes. I hope you find this helpful!
My channel membership is live check it out here!:
/ @consultingninja
Membership perk video:
• I launched a chatbot w...
Need help? visit www.consulting...
Check out my channel @ConsultingNinja for more videos like these.
SvelteKit Form Action Docs:
kit.svelte.dev...
SvelteKit API route creation video:
• SvelteKit | #api
First Look at SvelteKit video:
• SvelteKit | First Look
Load data video one:
• SvelteKit | Load
Load data more details:
• SvelteKit | Load details
SvelteKit Sandbox:
learn.svelte.d...
SvelteKit Docs:
kit.svelte.dev/
This is exactly what I needed, plain and simple how to get the darn [slug] page to work. Thank you! 🙏
You are VERY welcome! Thank you for watching!
very german intro logo 🇩🇪🇩🇪 like it keep it up!
Thanks, I have lots of videos I want to make but been swamped with work. I will continue to make them as I am able.
should the +page.js not have had to be +page.server.js since it exports the load function?
You can choose whether you want your load functions to run either BOTH on server AND in client, or ONLY the server. If you put your load function in +page.js it will run that load function in both places. If you put it in +page.server.js it will ONLY run on the server. see the docs here:
kit.svelte.dev/docs/load
I also have another load video you can check out here:
th-cam.com/video/MAPKUV_ODVU/w-d-xo.html
cool vid, but slugs are molluscs