Buy Now and unlock this series
$
49
.99
yours forever
$
49
.99
Become a Pro and unlock everything
$
24
.99
per month
$
24
.99
Loading Data Before Initial Render
Moving on past routing, we will now take a look at loading. Here we will learn how to load our data before the initial render happens for a very fast user experience.
Downloads
Become a pro to download code and videos
Svelte Kit
24 videos
Released: May 31 2021Course Instructor
Scott Tolinski
- What Is Svelte Kit
7m23s - Getting Started
8m22s - Exploring the Svelte Kit Demo
17m16s - Starting From A Skeleton
9m29s - Pages, Routing and Layouts In Svelte Kit
7m53s - The $lib Directory
4m58s - CSS In Svelte Kit - PostCSS, Scss & Scoping
11m35s - Tailwinds With PostCSS
9m41s - API Routes
5m49s - Nested Layouts
8m25s - Layout Resets
2m56s - Parameter Based File Names
8m2s - Loading Data Before Initial Render
9m24s - Markdown with MDSVEX
6m58s - Dynamic Imports and Frontmatter
6m36s - Frontmatter with MDSVEX
7m16s - Glob Imports
14m27s - Loading in Depth
14m50s - Error Pages
7m33s - Prefetch and Other Anchor Options
6m9s - Static Site Generation and Adapters
9m5s - Hosting On Render
6m49s - Building For Node
4m46s - TypeScript In Svelte Kit
5m50s
Comments
Doug
3 days ago [edited]
Running into this error from a couple of lessons ago. It's only impacting me now, since we're returning some data in this lesson.
It looks a bit fresh I guess? Last comment was 24 days ago. I did try what was suggested on that page below, but it didn't work.
I do realize that big changes are happening right now, but if you have any suggestions on how to workaround this issue, please let me know.
https://github.com/sveltejs/kit/issues/4382
I am on Linux, btw. Ubuntu 20.04, running Chrome 104.0.5112.79
Doug
3 days ago
Disregard, I got it sorted out.
Barbara
4 months ago
page has been removed, now use params in our case. See documentation here: https://kit.svelte.dev/docs/types#sveltejs-kit-loadinput
Code should look like:
<script context='module'> export async function load({ params}) { const post = { // slug comes directly from the file title title: params.slug, date: new Date(), body: "loremIpsum", }; return { props: { post } } } </script>
Doug
2 days ago
Much appreciate these updates. Thanks.
Kieran
about 1 month ago
Thanks Barbara !
Saeed
4 months ago
Thank you!
Want to join the conversation?
Become a Pro member today!