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
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
AIエージェント×GitHubで実現するQAナレッジの資産化と業務活用 / QA Knowledge as Assets with AI Agents & GitHub
tknw_hitsuji
0
150
中央集権型を脱却した話 分散型をやめて、連邦型にたどり着くまで
sansantech
PRO
1
190
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
190
visionOS 開発向けの MCP / Skills をつくり続けることで XR の探究と学習を最大化
karad
1
1.2k
Phase03_ドキュメント管理
overflowinc
0
1.3k
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
160
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
350
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
130
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
170
Kiro Powers 入門
k_adachi_01
0
130
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
tarappo
3
310
エンジニアリングマネージャーの仕事
yuheinakasaka
0
120
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Why Our Code Smells
bkeepers
PRO
340
58k
Making Projects Easy
brettharned
120
6.6k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
The Cult of Friendly URLs
andyhume
79
6.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Mobile First: as difficult as doing things right
swwweet
225
10k
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