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
100
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
47
Essential JavaScript libraries to improve your workflow
brunogenaro
0
65
Consuming Third Party Data With JSONP
brunogenaro
0
100
Improving your code with Linter tools
brunogenaro
0
65
Improving your Sublime Text 3 workflow
brunogenaro
0
180
Other Decks in Technology
See All in Technology
帳票構造化タスクにおけるLLMファインチューニングの性能評価
yosukeyoshida
1
210
MCPと認可まわりの話 / mcp_and_authorization
convto
2
350
「育てる」サーバーレス 〜チーム開発研修で学んだ、小さく始めて大きく拡張するAWS設計〜
yu_kod
1
230
公開初日に個人環境で試した Gemini CLI 体験記など / Gemini CLI実験レポート
you
PRO
3
1.3k
人に寄り添うAIエージェントとアーキテクチャ #BetAIDay
layerx
PRO
2
590
猫でもわかるQ_CLI(CDK開発編)+ちょっとだけKiro
kentapapa
0
160
株式会社島津製作所_研究開発(集団協業と知的生産)の現場を支える、OSS知識基盤システムの導入
akahane92
1
1.3k
SAE J1939シミュレーション環境構築
daikiokazaki
1
200
LLM開発を支えるエヌビディアの生成AIエコシステム
acceleratedmu3n
0
360
AI エンジニアの立場からみた、AI コーディング時代の開発の品質向上の取り組みと妄想
soh9834
8
630
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
12
2.3k
Wasmで社内ツールを作って配布しよう
askua
0
180
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Building an army of robots
kneath
306
45k
Making Projects Easy
brettharned
117
6.3k
The Invisible Side of Design
smashingmag
301
51k
We Have a Design System, Now What?
morganepeng
53
7.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Code Review Best Practice
trishagee
69
19k
How to train your dragon (web standard)
notwaldorf
96
6.1k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Done Done
chrislema
185
16k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
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