Getting started with Svelte

What is Svelte?

According to the official website;

“Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a c…


This content originally appeared on DEV Community and was authored by Benjamin Thorpe

What is Svelte?

According to the official website;

"Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app."

In simple terms, Svelte is a tool for building JavaScript-based web applications like React, Angular or Vue.

Technically, Svelte acts as a compiler.

Enough of the bells and whistle, there are many articles about how good and powerful Svelte really is, let's get right into our first project.

Our first Svelte Project.

TLDR: Use the online REPL to learn without installing anything locally.

Requirements

  • Install
    • Node
    • Git
  • Basics of:
    • HTML
    • CSS
    • JavaScript
    • Navigating the Command Line
// download the official svelte template
npx degit sveltejs/template project-name

// enter into project
cd project-name

// install dependencies to run svelte
npm install

// run the development server
npm run dev

Open browser and type localhost:5000, you should see something like this.
svelte-hello

Conclusion

This is the basics of getting started with Svelte. Thanks for reading.
Next up will be about the file structure in Svelte.

External Resources


This content originally appeared on DEV Community and was authored by Benjamin Thorpe


Print Share Comment Cite Upload Translate Updates
APA

Benjamin Thorpe | Sciencx (2021-07-28T20:59:02+00:00) Getting started with Svelte. Retrieved from https://www.scien.cx/2021/07/28/getting-started-with-svelte/

MLA
" » Getting started with Svelte." Benjamin Thorpe | Sciencx - Wednesday July 28, 2021, https://www.scien.cx/2021/07/28/getting-started-with-svelte/
HARVARD
Benjamin Thorpe | Sciencx Wednesday July 28, 2021 » Getting started with Svelte., viewed ,<https://www.scien.cx/2021/07/28/getting-started-with-svelte/>
VANCOUVER
Benjamin Thorpe | Sciencx - » Getting started with Svelte. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/28/getting-started-with-svelte/
CHICAGO
" » Getting started with Svelte." Benjamin Thorpe | Sciencx - Accessed . https://www.scien.cx/2021/07/28/getting-started-with-svelte/
IEEE
" » Getting started with Svelte." Benjamin Thorpe | Sciencx [Online]. Available: https://www.scien.cx/2021/07/28/getting-started-with-svelte/. [Accessed: ]
rf:citation
» Getting started with Svelte | Benjamin Thorpe | Sciencx | https://www.scien.cx/2021/07/28/getting-started-with-svelte/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.