Home
Jamstack Explorers
Menu

Building with SvelteKit and GraphCMS with Scott Spence

What is Svelte and SvelteKit

Okey dokey. So what is Svelte? Svelte is a component framework much like Vue and react, which allows you to break up your projects into reusable components.

Svelte is different from view and react, however, because it doesn't have a virtual DOM, and instead, builds into HTML, CSS and JavaScript in the build step. Svelte isn't new, relatively speaking, version one, or Svelte was released in late 2016.

Okay, so what is SvelteKit? SvelteKit will be a one-stop-shop for building everything from high performing apps to static pages. At the time of recording, this video SvelteKit is in public beta, with version one coming soon.

Tm toolkit includes lots of modern web development best practices, such as code-splitting, offline support and prefetching out of the box. SvelteKit utilises endpoints which are modules that can be written in JavaScript or TypeScript.

That export functions corresponding to HTTP methods, such as get, post, put and delete. One thing to note is that because delete is a reserved word in JavaScript SvelteKit delete requests need to be handled with a del function. It's very much like next j s but uses Svelte instead of react. Okay, let's go through the process of setting up our SvelteKit project.

Explorers

your progress

212