Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Intro to Next 13 Server Components
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Callum Silcock
March 09, 2023
Technology
0
260
Intro to Next 13 Server Components
A lightning talk on the new Next 13 BETA Server Components feature and how to use them
Callum Silcock
March 09, 2023
Tweet
Share
More Decks by Callum Silcock
See All by Callum Silcock
Unlocking Lockfiles - A Developers Guide to Package Management
csilk
0
130
Attacking the Frontend
csilk
0
230
Advanced Testing concepts
csilk
0
340
Automating Design Review with Visual Regression
csilk
0
430
🎟 Tech Delivery Blueprint (Agile)
csilk
0
53
Using Given / When / Then with Cypress
csilk
0
1.3k
Intro To Basic UX Concepts
csilk
0
160
ReactJS For Beginners
csilk
0
110
What is Redux (vs. MVC)
csilk
1
200
Other Decks in Technology
See All in Technology
Phase07_実務適用
overflowinc
0
880
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
450
visionOS 開発向けの MCP / Skills をつくり続けることで XR の探究と学習を最大化
karad
1
1.2k
SLI/SLO 導入で 避けるべきこと3選
yagikota
0
140
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
130
Goのerror型がシンプルであることの恩恵について理解する
yamatai1212
1
290
Phase03_ドキュメント管理
overflowinc
0
1.2k
大規模ECサイトのあるバッチのパフォーマンスを改善するために僕たちのチームがしてきたこと
panda_program
1
330
AlloyDB 奮闘記
hatappi
0
190
Tebiki Engineering Team Deck
tebiki
0
27k
スピンアウト講座01_GitHub管理
overflowinc
0
640
新規事業×QAの挑戦:不確実性を乗りこなす!フェーズごとに求められるQAの役割変革
hacomono
PRO
0
150
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
84
Abbi's Birthday
coloredviolet
2
5.5k
Utilizing Notion as your number one productivity tool
mfonobong
4
270
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
140
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
The Curious Case for Waylosing
cassininazir
0
270
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
GitHub's CSS Performance
jonrohan
1032
470k
ラッコキーワード サービス紹介資料
rakko
1
2.7M
Transcript
🛄 VS 📳 NEXT 13 SERVER COMPONENTS Another CodingWithCallum™️ Session
⚡️ lightning talk ⚡️
🛄 SERVER COMPONENT A component that is fetched and rendered
ON THE SERVER
📳 CLIENT COMPONENT A component that is fetched and rendered
ON THE CLIENT
EXAMPLES
None
USING SERVER COMPONENTS 🛄 Only download HTML built by the
server Instant render Speed 🏃♀️💨 + the JS required for the client components (if any) react cached Make direct API calls (server to server)
NOT USING SERVER COMPONENTS 📳 Install all JS Dependencies to
run the site React etc. Then grab all our Client JS Components Then render
WHEN TO USE SERVER 🛄 VS CLIENT 📳 COMPONENTS Need
to access browser related stuff = Client Component Anything Else? = Server Component
None
INTERLEAVING
HOW DO I DEFINE A CLIENT 📳 COMPONENT 'use client';
import { useState } from 'react'; export default function Counter() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button>
</div> );
SHARED COMPONENT 🛄📳 What if something is Server And Client
Wait what?
SHARING DATA FROM 🛄 SERVER TO 📳 CLIENT Make your
API requests on the server Keep as many dependencies on the server as possible Eg. pass i18n translations from server > client to avoid client code (prop drilling in this case is OK)
MUTATING DATA ON THE 📳 CLIENT RPC from the client
This will change Next is working on a RFC on this at the moment We will go with what their suggestion is Watch this space
READ THE DOCS! Next 13 Server And Client Components
None