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
Renderizando Componentes React no Servidor
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Bruno Genaro
July 01, 2017
Technology
350
1
Share
Renderizando Componentes React no Servidor
Talk presented at FrontInSampa 2017 (07/01/2017) in Sao Paulo (Brazil)
Bruno Genaro
July 01, 2017
More Decks by Bruno Genaro
See All by Bruno Genaro
The future of React with Universal web applications
brunogenaro
0
120
The future of React with Universal web applications
brunogenaro
0
130
Understand Front-End Roles
brunogenaro
1
170
Why did I build my website using ReactJS?
brunogenaro
0
62
Essential JavaScript libraries to improve your workflow
brunogenaro
0
83
Consuming Third Party Data With JSONP
brunogenaro
0
120
Improving your code with Linter tools
brunogenaro
0
81
Improving your Sublime Text 3 workflow
brunogenaro
0
190
Other Decks in Technology
See All in Technology
おいらのAWSアップデートの追い方〜Slack×AgentCore〜
yakumo
1
110
Claude Code で使える DuckDB Skills を試してみた / DuckDB Skills and Claude Code
masahirokawahara
1
730
ESP32 IoTを動かしながらメモリ使用量を観測してみた話
zozotech
PRO
0
140
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.5k
freeeで運用しているAIQAについて
qatonchan
1
640
障害対応のRunbookは作った、でも本当に動くの? AWS FIS で EKS の AZ 障害を再現してみた
tk3fftk
0
100
開発サイクルのボーダーレス化に伴う組織変革から学んだこと / Organizational Transformation Amid the Borderless Development Cycle
mii3king
0
200
React Compiler導入から21ヶ月、いま始めるならこうやる
astatsuya
2
250
GCASアップデート(202603-202605)
techniczna
0
210
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
「背中を見て育て」からの卒業 〜専門技術としてのテスト設計を軸に、品質保証のバトンを繋ぐ〜 #genda_tech_talk
nihonbuson
PRO
4
1.5k
クラウドネイティブ DB はいかにして制約を 克服したか? 〜進化歴史から紐解く、スケーラブルアーキテクチャ設計指針〜
hacomono
PRO
6
1.1k
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
370
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
150
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Fireside Chat
paigeccino
42
3.9k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
140
Become a Pro
speakerdeck
PRO
31
5.9k
So, you think you're a good person
axbom
PRO
2
2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
A Soul's Torment
seathinner
6
2.8k
Transcript
RENDERIZANDO COMPONENTES REACT NO SERVIDOR BRUNO GENARO @BFGENARO
WHO IS THIS GUY? BRUNO GENARO FRONT-END ENGINEER
SAN FRANCISCO'S OFFICE
None
None
None
None
None
PIRACICABA/SP
None
WHAT IS THIS TALK ABOUT? JAVASCRIPT NODEJS UNIVERSAL VS ISOMORPHIC
JAVASCRIPT REACTJS WHY? HOW? WHEN? WHERE?
None
1995
1995 Brendan eich • hired by netscape • creator of
javascript • javascript was written in 10 days!!!
2009 ryan dahl • creator of nodejs • Google’s V8
JavaScript runtime • javascript on the server
2011 Jordan Walke • creator of reactjs • one-way data
flow • virtual dom • JSX
2011 still… Charlie Robbins • Isomorphic Javascript • JAVASCRIPT on
the Client and the server
None
2014 michael jackson • universal Javascript • JAVASCRIPT on the
Client and the server
None
LET THE FIGHT BEGIN THEY ARE THE SAME THING
THERE ARE ONLY TWO HARD THINGS IN COMPUTER SCIENCE: CACHE
INVALIDATION AND NAMING THINGS. - PHIL KARLTON
let’s go back in time! being a JavaScript developer wasn’t
a thing to be proud of
None
“real coding" was done in the backend
and now… even on the server (and client at the
same time)
OK, LET’S TALK ABOUT REACT
UNIVERSAL REACT REACT CODE THAT RUNS ON CLIENT SIDE (BROWSER)
AND SERVER SIDE
what does that mean? - On first page load, SERVER
returns pre- rendered HTML STRING - Client-side JS app bootstraps on top of server-rendered HTML - From that point on, it's a client-side JS app
why? - usually jAVascript frameworks render on dom load (which
can be really slow) - bad for user experience - SEO BENEfits
EVERY TIME YOU RELEASE A CLIENT-SIDE ONLY WEBSITE TO THE
INTERNET SOMEONE WRITES A FRUSTRATED BLOG POST
None
how? ABILITY TO RENDER A REACT COMPONENT TO A STRING
react component
returns this string
WAIT! WE CAN RUN JAVASCRIPT ALSO ON THE SERVER SIDE,
RIGHT?
THAT’S RIGHT! SO… SO WE CAN RENDER REACT COMPONENTS ON
THE SERVER!
where?
then…
None
when? ELIMINATE THE FOUC (flash of unstyled content) Better overall
user experience
when? SHARED CODE Easier code maintenance
when? PROGRESSIVE ENHANCEMENt
when? Improve search engine optimization
None
final thoughts •UNIVERSAL apps do NOT replace the server •instead
it Is a way to PRE-initialize the client •after the page loads, it becomes a client-side JS app
QUICK RECAP • On first page load, SERVER returns pre-rendered
HTML STRING • From that point on, it's a client-side JS app • ELIMINATE "FOUC" GIVING A BETTER USER EXPERIENCE • EASIER CODE MAINTENANCE • PROGRESSIVE ENHANCEMENt • IMPROVE SEARCH ENGINE OPTIMIZATION
what next?
None
None
orlandoJS
None
REACT WEBPACK UNIVERSAL REACT REDUX REACT INTL
THANK YOU! @BFGENARO