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
250
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
110
Attacking the Frontend
csilk
0
210
Advanced Testing concepts
csilk
0
310
Automating Design Review with Visual Regression
csilk
0
420
🎟 Tech Delivery Blueprint (Agile)
csilk
0
50
Using Given / When / Then with Cypress
csilk
0
1.3k
Intro To Basic UX Concepts
csilk
0
150
ReactJS For Beginners
csilk
0
110
What is Redux (vs. MVC)
csilk
1
190
Other Decks in Technology
See All in Technology
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
290
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
350
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
190
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
940
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
140
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
150
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.4k
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.4k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
What happened to RubyGems and what can we learn?
mikemcquaid
0
300
プロポーザルに込める段取り八分
shoheimitani
1
270
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
66
YesSQL, Process and Tooling at Scale
rocio
174
15k
Practical Orchestrator
shlominoach
191
11k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
120
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Crafting Experiences
bethany
1
49
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
62
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
WCS-LA-2024
lcolladotor
0
450
ラッコキーワード サービス紹介資料
rakko
1
2.3M
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