Skip to content

Commit

Permalink
add rendering paradigm
Browse files Browse the repository at this point in the history
  • Loading branch information
saenyakorn committed Jan 11, 2024
1 parent ec982cc commit d1ce50b
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 8 deletions.
23 changes: 23 additions & 0 deletions docs/slidev/pages/rendering-paradigm/csr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,26 @@
---

# Client-side rendering

![](/assets/csr.png){width=70%}

```html {all|9,11}
<!-- index.html -->
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div id="body"></div>
</body>
<script src="index.js"></script>
</html>
```

```js
// index.js
React.render(<App />, document.getElementById('body'))s
```
9 changes: 9 additions & 0 deletions docs/slidev/pages/rendering-paradigm/curl-csr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
---

![](/assets/curl-csr.png){style="margin: auto;"}

## Not good for SEO

- Crawler don't wait for JS to load and don't execute JS
- Crawler will know only content in '<meta\>'
1 change: 1 addition & 0 deletions docs/slidev/pages/rendering-paradigm/isr.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

# Incremental Static Regeneration (ISR)

![](/assets/isr.png)
12 changes: 12 additions & 0 deletions docs/slidev/pages/rendering-paradigm/outro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
---

# Comparasion

![](/assets/csr.png){width=55%}

![](/assets/ssr.png){width=55%}

![](/assets/ssg.png){width=55%}

![](/assets/isr.png){width=55%}
5 changes: 0 additions & 5 deletions docs/slidev/pages/rendering-paradigm/rsc.md

This file was deleted.

4 changes: 3 additions & 1 deletion docs/slidev/pages/rendering-paradigm/ssg.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
---

# Static Site Generation (SSG)
# Static Site Generation (SSG)

![](/assets/ssg.png)
4 changes: 3 additions & 1 deletion docs/slidev/pages/rendering-paradigm/ssr.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
---

# Server-side redering (SSR)

# Server-side redering
![](/assets/ssr.png)
Binary file added docs/slidev/public/assets/csr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/slidev/public/assets/curl-csr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/slidev/public/assets/isr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/slidev/public/assets/ssg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/slidev/public/assets/ssr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion docs/slidev/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ src: ./pages/rendering-paradigm/ssr.md
src: ./pages/rendering-paradigm/csr.md
---

---
src: ./pages/rendering-paradigm/curl-csr.md
---

---
src: ./pages/rendering-paradigm/ssg.md
---
Expand All @@ -210,7 +214,7 @@ src: ./pages/rendering-paradigm/isr.md
---

---
src: ./pages/rendering-paradigm/rsc.md
src: ./pages/rendering-paradigm/outro.md
---

---
Expand Down

0 comments on commit d1ce50b

Please sign in to comment.