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
300
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
97
The future of React with Universal web applications
brunogenaro
0
110
Understand Front-End Roles
brunogenaro
1
150
Why did I build my website using ReactJS?
brunogenaro
0
41
Essential JavaScript libraries to improve your workflow
brunogenaro
0
56
Consuming Third Party Data With JSONP
brunogenaro
0
96
Improving your code with Linter tools
brunogenaro
0
59
Improving your Sublime Text 3 workflow
brunogenaro
0
170
Other Decks in Technology
See All in Technology
はてなの開発20年史と DevOpsの歩み / DevOpsDays Tokyo 2025 Keynote
daiksy
5
1.4k
技術者はかっこいいものだ!!~キルラキルから学んだエンジニアの生き方~
masakiokuda
2
140
Beyond {shiny}: The Future of Mobile Apps with R
colinfay
1
370
Tokyo dbt Meetup #13 dbtと連携するBI製品&機能ざっくり紹介
sagara
0
430
Lightdashの利活用状況 ー導入から2年経った現在地_20250409
hirokiigeta
2
270
50人の組織でAIエージェントを使う文化を作るためには / How to Create a Culture of Using AI Agents in a 50-Person Organization
yuitosato
6
3.2k
バックオフィス向け toB SaaS バクラクにおけるレコメンド技術活用 / recommender-systems-in-layerx-bakuraku
yuya4
2
290
Creating Awesome Change in SmartNews
martin_lover
1
240
AIと開発者の共創: エージェント時代におけるAIフレンドリーなDevOpsの実践
bicstone
1
250
DuckDB MCPサーバーを使ってAWSコストを分析させてみた / AWS cost analysis with DuckDB MCP server
masahirokawahara
0
750
プロダクト開発におけるAI時代の開発生産性
shnjtk
2
200
自分の軸足を見つけろ
tsuemura
2
600
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
430
65k
Writing Fast Ruby
sferik
628
61k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
What's in a price? How to price your products and services
michaelherold
245
12k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Rails Girls Zürich Keynote
gr2m
94
13k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
9
740
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Bash Introduction
62gerente
611
210k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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