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
Bruno Genaro
July 01, 2017
Technology
1
320
Renderizando Componentes React no Servidor
Talk presented at FrontInSampa 2017 (07/01/2017) in Sao Paulo (Brazil)
Bruno Genaro
July 01, 2017
Tweet
Share
More Decks by Bruno Genaro
See All by Bruno Genaro
The future of React with Universal web applications
brunogenaro
0
110
The future of React with Universal web applications
brunogenaro
0
120
Understand Front-End Roles
brunogenaro
1
150
Why did I build my website using ReactJS?
brunogenaro
0
48
Essential JavaScript libraries to improve your workflow
brunogenaro
0
68
Consuming Third Party Data With JSONP
brunogenaro
0
100
Improving your code with Linter tools
brunogenaro
0
69
Improving your Sublime Text 3 workflow
brunogenaro
0
180
Other Decks in Technology
See All in Technology
激動の時代を爆速リチーミングで乗り越えろ
sansantech
PRO
1
140
入院医療費算定業務をAIで支援する:包括医療費支払い制度とDPCコーディング (公開版)
hagino3000
0
110
頭部ふわふわ浄酔器
uyupun
0
220
Dify on AWS 環境構築手順
yosse95ai
0
150
[re:Inent2025事前勉強会(有志で開催)] re:Inventで見つけた人生をちょっと変えるコツ
sh_fk2
1
620
オブザーバビリティと育てた ID管理・認証認可基盤の歩み / The Journey of an ID Management, Authentication, and Authorization Platform Nurtured with Observability
kaminashi
1
980
SOTA競争から人間を超える画像認識へ
shinya7y
0
590
GraphRAG グラフDBを使ったLLM生成(自作漫画DBを用いた具体例を用いて)
seaturt1e
1
150
NLPコロキウム20251022_超効率化への挑戦: LLM 1bit量子化のロードマップ
yumaichikawa
3
540
スタートアップの現場で実践しているテストマネジメント #jasst_kyushu
makky_tyuyan
0
140
Okta Identity Governanceで実現する最小権限の原則
demaecan
0
140
【SORACOM UG Explorer 2025】さらなる10年へ ~ SORACOM MVC 発表
soracom
PRO
0
160
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
GraphQLとの向き合い方2022年版
quramy
49
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Facilitating Awesome Meetings
lara
57
6.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Practical Orchestrator
shlominoach
190
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Balancing Empowerment & Direction
lara
5
700
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