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
270
0
Share
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
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
240
Advanced Testing concepts
csilk
0
340
Automating Design Review with Visual Regression
csilk
0
430
🎟 Tech Delivery Blueprint (Agile)
csilk
0
55
Using Given / When / Then with Cypress
csilk
0
1.3k
Intro To Basic UX Concepts
csilk
0
160
ReactJS For Beginners
csilk
0
120
What is Redux (vs. MVC)
csilk
1
200
Other Decks in Technology
See All in Technology
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
170
スケーリングを封じられたEC2を救いたい
senseofunity129
0
130
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
34
16k
LLMに何を任せ、何を任せないか
cap120
11
6.7k
Zephyr(RTOS)でOpenPLCを実装してみた
iotengineer22
0
160
やさしいとこから始めるGitHubリポジトリのセキュリティ
tsubakimoto_s
3
2.1k
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
170
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
3
1.1k
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
120
AI時代のIssue駆動開発のススメ
moongift
PRO
0
320
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
210
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
280
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Amusing Abliteration
ianozsvald
0
150
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
190
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Everyday Curiosity
cassininazir
0
180
Agile that works and the tools we love
rasmusluckow
331
21k
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