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
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
180
Attacking the Frontend
csilk
0
270
Advanced Testing concepts
csilk
0
390
Automating Design Review with Visual Regression
csilk
0
470
🎟 Tech Delivery Blueprint (Agile)
csilk
0
59
Using Given / When / Then with Cypress
csilk
0
1.4k
Intro To Basic UX Concepts
csilk
0
180
ReactJS For Beginners
csilk
0
130
What is Redux (vs. MVC)
csilk
1
210
Other Decks in Technology
See All in Technology
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
3.4k
kintone の AI コワーカーを、 Anthropic にエージェントを"ホストさせて"作った話 #devkinmeetup
sugimomoto
0
110
Empower GenAI with Agile - あなたのアジャイルが生成AIのバフになる仕組み
hageyahhoo
1
210
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
420
「守りたい体験」を渡すだけで E2E を生成させられるようになった話
hinac0
0
210
Foxgloveについて 実際にExtensionを開発して公開するまでの話 / About Foxglove: The Story of Developing and Releasing an Extension
ry0_ka
0
300
誤解だらけの開発生産性 / Myths and Misconceptions about Developer Productivity
i35_267
2
800
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
910
あなたの『Site』はどこですか? — xREという考え方
miyamu
0
1.2k
穢れた技術選定について
watany
17
5.5k
実践!既存 Project への AI-Driven Development 適用〜 一ヶ月で Project 唯一のフロントエンドエンジニアを作り出せ〜
lycorptech_jp
PRO
0
230
Genie Ontologyは銀の弾丸かを考える / Is Genie Ontology a Silver Bullet?
nttcom
0
400
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Raft: Consensus for Rubyists
vanstee
141
7.6k
Six Lessons from altMBA
skipperchong
29
4.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
630
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
550
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.7k
30 Presentation Tips
portentint
PRO
1
350
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
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