SvelteIntroduction Svelte Themes

Svelteintroduction

Quick introduction to the Svelte framework and comparison with vanilla JavaScript

Svelte Introduction

This is a quick introduction to Svelte including a comparison of a simple web application written in Svelte and in vanilla JavaScript.

To open the Svelte project, go to the Svelte folder and run the following commands in a terminal. Note you need to have NodeJS installed in order to run the Svelte project.

npm install #Only if it is the first time you are running the project
npm run dev

To run the vanilla JavaScript version, simply open the index.html file using a web browser.

Creating a new Svelte app

npm init vite my-app -- --template svelte
cd my-app
npm install
npm run dev

Top categories

Loading Svelte Themes