DEV Community

Cover image for Introduction to Sveltekit
Arya Krishna
Arya Krishna

Posted on

Introduction to Sveltekit

Svelte-kit is a framework for building website with Svelte. It is a front end javascript library with the following features -

  • Server and client side rendering
  • comes with routing systems
  • provides a backend API
  • code splitting

This is also a popular SPA framework. According to mdn web docs

An SPA (Single-page application) is a web app implementation that loads only a single web document, and then updates the body content of that single document via JavaScript APIs such as XMLHttpRequest and Fetch when different content is to be shown.

The easiest way to start building a SvelteKit app is to run

npm init svelte my-app
Enter fullscreen mode Exit fullscreen mode

In order to have a proper functioning svelte app you need to make sure you have an updated version of node js installed to your system. Svelte sometimes runs into problems with older versions of node.

If you use vs code extensions svelte for vs code is a good extension to install. This will provide us with syntax highlighting for svelte components.

Learn more about svelte kit here

Top comments (1)

Collapse
 
antoonline profile image
Anto Online

It seems promising after reading the docs intro:

"Building an app with all the modern best practices is fiendishly complicated. Those practices include build optimizations, so that you load only the minimal required code; offline support; prefetching pages before the user initiates navigation; and configurable rendering that allows you to generate HTML on the server or in the browser at runtime or at build-time."