Svelte Kit is an extension to Svelte that does these very important tasks:
- Provide client-side, in-browser routing.
- Totally abstract out client-side rendering (CSR), server-side rendering (SSR), and pre-rendering (static generation of HTML output at build time).
- Allow routes to be generated from file-system structure (
src/routes/foo.svelte
component renders at route/foo
) - Wrap route components as a
slot
inside layout component insrc/routes/__layout.svelte
. - Provide server-side endpoints that return dynamic data.
- Execute hooks on the server at predefined points, such as before every request received by the server.
- Allow routes to load data from own server or any other server using
load
method. - Swap out and swap in different backends using adapters.
Now, teach yourself Svelte Kit using that docs page.