meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Scott Teaches Wes Svelte and Sapper

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, Technology, News

4.91.2K Ratings

🗓️ 20 May 2020

⏱️ 51 minutes

🧾️ Download transcript

Summary

In this episode of Syntax, Scott teaches Wes about Svelte and Sapper — general premise, best practices, and more! Sanity - Sponsor Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax. Stackbit - Sponsor Stackbit offers developers tools that enable things like inline content editing, live previewing of content changes, and collaboration features on your Jamstack site, without code changes. That's why Stackbit is the best way to Jamstack. stackbit.com Show Notes 03:14 - General premise Sapper compiles away, removing framework code from build Component & Props based Easy reactivity Built-in tools like animation Template-based 07:57 - Svelte 101 .svelte files Files can include , , and straight-up CSS Variables are used in templates via {var} - even works Import component and use just like React and Vue 10:49 - Stylin’ All styles are scoped by default global() to wrap around global declarations Language type sass to use sass 12:22 - Reactivity Baked in let count = 0 count = count + 1 will reactively update in template variables are essentially state $: double = count + 2 - to create a reactive variable that updates when another variable updates $: console.log(count) = will run whenever count is update a-la useEffect $: if (count >10) = same… reactive if  updates let name in script 15:55 - Props Same was React, but need to be exported before they can be used Seems counterintuitive, but you get over it quickly EZ defaults export let answer = 'a mystery'; import Nested from './Nested.svelte'; export let answer = 'a mystery'; The answer is {answer} 20:08 - Template logic If statements {#if user._id} {/if} Loops {#each cats as kittens} Promise tags {#await promise} ...waiting {:then number} The number is {number} {:catch error} {error.message} {/await} 23:12 - Events On directive Functions can also be inline Modifiers Click me 26:11 - Baked-in goodies Animation Dimensions {text} Lifecycle methods Advanced State Via Stores A store is simply an object with a subscribe method that allows interested parties to be notified whenever the store value changes. import { writable } from ‘svelte/store’; export const count = writable(0); count.update(0) Slots React helmet like stuff, ie 36:39 - Sapper Similar to Next.js Folder routes Static export with all of the good stuff like service workers and preloading Links Svelte Sapper r/webdev Vue.js ScottTolinski.com WesBos.com Next.js ScottTolinski.com Github Repo Gatsby.js Shawn Swyx ××× SIIIIICK ××× PIIIICKS ××× Scott: Lewisia Battery Backup Solar Fountain Pump Wes: Firefox Containers Shameless Plugs Scott: LevelUpTuts YouTube Channel Wes: Wes’ New Website Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

You're listening to Syntax, the podcast with the tastiest web development treats out there.

0:06.0

Strap yourself in and get ready.

0:08.0

Here is Scott Telinsky and West Boss.

0:10.4

Welcome to Syntax, this is the podcast with the tastiest web development treats out there. My name is West Boss and with me as always is Mr. Scott Tolinsky. How you doing today Scott?

0:21.0

Hey, I'm doing good. You know living that life that we're all living right now and just doing

0:26.0

the best we can.

0:27.0

That's the slogan.

0:29.0

But yeah, how are you doing?

0:30.0

I'm doing pretty good.

0:31.4

I'm a little frustrated at my internet right now. It's being very slow. We've got actually I think an update to the

0:40.0

rural internet rural rule how do you say that rural internet. rural, rural, rural, how do you say that?

0:44.0

Rural internet, which usually I get about 12 megabits down,

0:48.0

which is more than enough for nice and fast internet,

0:52.0

but right now it's choking at about like,

0:55.0

yeah, I'm getting three right now, which is okay for

0:58.0

recording this podcast and I can see your video,

1:00.0

but the latency is bad

1:02.0

and if my kids start watching a show or something like that then the whole thing just comes crashing down.

1:07.0

So I'm doing a little bit of research and can I just get a secondary setup of what I currently have just like my own my own line.

1:14.8

Yeah I know see now it's not the time for me to brag about my internet but I'm like

1:20.0

wired via Ethernet no No, man.

1:23.0

It's like my office is the main connection here and everybody else can get the slower internet in the house.

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.