svelte-presentation

Svelte Presentation

A Friday training session on Svelte

A Short Svelte 3 Tutorial

Disclaimers

This repository was created as part of a presentation on Svelte that I gave to colleagues.

Note that I'm definitely no Svelte expert. I've only been playing with it in my spare time for a couple of months. So, my apologies if anything in here is incorrect or misleading. Feel free to raise an issue or a PR if you think something should really be fixed.

Also, a number of the examples contain friendly digs at Angular, React and Vue. That's just my sense of humour. Please don't read anything into it. They're all fine frameworks. I've just been smitten by the simplicity and power of Svelte 3, and the jokes were really just to make my talk a little less dry :smile:.

Most of my colleagues remained awake until the end, so hopefully others will get some value from it. Enjoy!

Acknowledgement

I've borrowed at least one of the examples directly from the Svelte documentation, just because I couldn't think of a simpler one. From memory, it was the one that explains #await.

I'm putting an acknowledgment here, rather than in that branch, to cover any others I may have forgotten, or end up adding in future updates.

How To Navigate

The branches of this repository contain simple examples that illustrate various aspects of Svelte 3.

If you check out Step-01-Create-An-Empty-Application and do an npm i and then leave npm run dev executing, you should be able to just check out each branch after that, and the code will get rebuilt automatically.

The branches whose titles include Step-13 and Step-14 are exceptions, in that they have external dependencies (one on D3 and the other on a Svelte routing package). You'll need to kill the npm run dev, re-execute npm i, to install the dependency, and then npm run dev again.

Better Sources Of Information

The best place to see a full overview of the functionality it provides is the official tutorial at https://svelte.dev/tutorial/basics.

The pages there explain things that you generally want from a framework, and how they're achieved with Svelte 3. In particular, because it provides a REPL that runs the code, you can play around and see what effect your changes have.

There are various tabs on that site that provide different information:

Some Excellent Introductory Videos

Here are a few videos I think explain the concepts behind Svelte well:

If you search for "Svelte 3" on YouTube, you'll find a lot more, including an example of using Svelte with GraphQL https://www.youtube.com/watch?v=WqOLx2yuF3M&t=159s and a half hour crash course https://www.youtube.com/watch?v=uK2RnIzrQ0M.

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes