5 Matching Annotations
  1. May 2021
  2. Dec 2020
    1. Preload functions are typically used to load data that the page depends on, hence its name. This avoids the user seeing the page update as it loads, as is typically the case with client-side loading.
    2. Page components can define a preload function that runs before the component is created. The values it returns are passed as props to the page.
    3. Preload is the Sapper equivalent to getInitialProps in Next.js or asyncData in Nuxt.js.