Nov 2 '20
If you're a first-time Svelte user such as myself, you might be asking yourself, "What is this strange framework, everything seems not redundant, not confusing and EASY, is this even used?" No worries, I have some answers for you first-time Svelte users. Svelte is a compiler that takes your component code and converts it into a clean JS code. "Svelte makes it joyful and to create interactive UIs."
Svelte does make it joyful once you understand some of the basics that make Svelte so great. Soon you'll be creating apps much sooner and learn along with the process, giving Agent Smith a much-deserved prescription of Svelte magic if you catch what I'm pitching. Svelte is straightforward and comes with batteries and the learning curve is much less and you understand much quickly with a lot less boilerplate code. Let's take a look at some of the basics of creating Svelte apps.
npx degit sveltejs/template my-coolest-svelte-project cd my-coolest-svelte-project npm install npm run dev
Zero worries components "But wait? where are the complex classes that are exported in React?" Just export variables that are going to be props as simple as that 😉.
Svelte's most simplistic approach needs no installation of external libraries and anything on the store can be manipulated by using
$ before what is variable is in the store. You do not need Redux.
Now you know how to start with Svelte you have become much cooler
- Official Twitter
- Svelte Society
- Come join our discord You can find me active there and when you get stuck somewhere say hi!
Other favourite talks.
- Ron Au: Web à la Mode
- Rich Harris - Rethinking reactivity
- The Return of 'Write Less, Do More' by Rich Harris | JSCAMP 2019
Also, this 😎