You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8419d21
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/codingcatdev/src/content/course/intro-to-svelte/lesson/fundamentals-benefits-of-sveltekit.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,16 @@ weight: 5
10
10
youtube: https://youtu.be/Z_DAxhYbjyM
11
11
---
12
12
13
-
## **Benefits of SvelteKit**
13
+
## Benefits of SvelteKit
14
14
15
15
Now let’s go through, in more detail, some of the benefits of SvelteKit.
16
16
17
-
Here we have a diagram with some of the reasons why SvelteKit is becoming so popular. First, let’s look at the different rendering options. With SvelteKit, you can choose how you want to render content based on the route it is on. Originally with Svelte, the content was always rendered on the client side and you didn’t have access to the server at all. But with SvelteKit, we have the flexibility to decide what option best fits our application.
17
+
Here we have a diagram with some of the reasons why SvelteKit is becoming so popular. First, let’s look at the different rendering options. With SvelteKit, you can choose how you want to render content based on the route it is on. Originally with Svelte, the content was always rendered on the client side and you didn’t have access to the server at all. But with SvelteKit, we have the flexibility to decide what option best fits our application.
18
18
19
-
You may have seen some of these acronyms before, but if not that’s the thing about web development, there are always room for more acronyms. The options we have in SvelteKit include Client Side Rendering (CSR) like Svelte provided, but also Server Side Rendering (SSR) and Static Site Generation (SSG). With SvelteKit, we can even use both and choose which is best for each route. First, let’s take a look at server-side rendering.
19
+
You may have seen some of these acronyms before, but if not that’s the thing about web development, there are always room for more acronyms. The options we have in SvelteKit include Client Side Rendering (CSR) like Svelte provided, but also Server Side Rendering (SSR) and Static Site Generation (SSG). With SvelteKit, we can even use both and choose which is best for each route. First, let’s take a look at server-side rendering.
20
20
21
-
This means that the content is generated by the server each time a user visits the page, which is ideal for SEO and content that always needs to be up to date. You would use this on sites that require a lot of user interaction or rely on a database for the latest content.
21
+
This means that the content is generated by the server each time a user visits the page, which is ideal for SEO and content that always needs to be up to date. You would use this on sites that require a lot of user interaction or rely on a database for the latest content.
22
22
23
-
Next, there is static site generation where all of the files get generated at build time by the server and are cached at that moment in time. Your browser is fetching that same cached content over and over, making it extremely fast. This is great for content that doesn’t change. A good use case for this would be a blog site, landing page, or a store with products that don’t change very often. And last we have Client Side Rendering or you may have heard the term SPA, Single Page Application. This is where the browser handles most of the work and first load times are slower, but once it is loaded the site can feel more responsive.
23
+
Next, there is static site generation where all of the files get generated at build time by the server and are cached at that moment in time. Your browser is fetching that same cached content over and over, making it extremely fast. This is great for content that doesn’t change. A good use case for this would be a blog site, landing page, or a store with products that don’t change very often. And last we have Client Side Rendering or you may have heard the term SPA, Single Page Application. This is where the browser handles most of the work and first load times are slower, but once it is loaded the site can feel more responsive.
24
24
25
-
Next, we’ll look at the 2nd benefit of SvelteKit, performance.
25
+
Next, we’ll look at the 2nd benefit of SvelteKit, performance.
Copy file name to clipboardExpand all lines: apps/codingcatdev/src/content/course/intro-to-svelte/lesson/fundamentals-performance.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ weight: 6
10
10
youtube: https://youtu.be/W_3YmcybZKc
11
11
---
12
12
13
-
## **Performance**
13
+
## Performance
14
14
15
15
Welcome back, performance is one of the greatest benefits of SvelteKit. The hard jobs that make creating performant applications so difficult come for free with Sveltekit. It uses a tool called Vite, with a Svelte plugin, to provide instant server starts, lightning-fast development with hot module reloading, bundling, and the code-splitting that optimizes your code for production.
16
16
17
-
Code-splitting is breaking up your app to improve the page loading time by only using what is needed for the current page. Instead of a single JavaScript bundle, it splits each route into it’s own chunk. It is essentially a fancy name for dynamic imports. This creates an optimized, production ready version of your application. Now, let’s move on to file system based routing.
17
+
Code-splitting is breaking up your app to improve the page loading time by only using what is needed for the current page. Instead of a single JavaScript bundle, it splits each route into it’s own chunk. It is essentially a fancy name for dynamic imports. This creates an optimized, production ready version of your application. Now, let’s move on to file system based routing.
Copy file name to clipboardExpand all lines: apps/codingcatdev/src/content/course/intro-to-svelte/lesson/fundamentals-what-is-svelte.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,11 @@ title: Fundamentals - What is Svelte
10
10
weight: 3
11
11
youtube: https://youtu.be/dZ1CI3u1MYA
12
12
---
13
-
## **What is Svelte?**
13
+
14
+
## What is Svelte?\*\*
14
15
15
16
Svelte is a component framework that allows you to break up your application into reusable chunks and provides some sugary syntax, making your code base easy to understand and very graceful.
16
17
17
18
Svelte is similar to React & Vue, with one key difference, there is NO VIRTUAL DOM. Instead of shipping the framework to the browser and letting it do the work, Svelte compiles itself away during a build step into vanilla html, css, and js. Making it one of the leanest frameworks out there
18
19
19
-
If you have experience with HTML, CSS, and JavaScript, you will feel right at home with Svelte. Having just a basic understanding is all that you need and we’ll cover everything else in this course. Next let’s take a look at what we’ll be using to write our applications.
20
+
If you have experience with HTML, CSS, and JavaScript, you will feel right at home with Svelte. Having just a basic understanding is all that you need and we’ll cover everything else in this course. Next let’s take a look at what we’ll be using to write our applications.
0 commit comments