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
Recriando o React do Zero em 10 minutos
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Afonso Pacifer
July 29, 2023
Programming
120
0
Share
Recriando o React do Zero em 10 minutos
Front in Sampa 2023
Afonso Pacifer
July 29, 2023
More Decks by Afonso Pacifer
See All by Afonso Pacifer
Developer Experience (DevEx) no mundo Front-End: Do Ruby ao Next.js
afonsopacifer
0
92
Open Source e Developer Experience
afonsopacifer
1
140
Conhecendo a área de Developer Experience (DevEx)
afonsopacifer
0
110
Do Zero ao Sênior Apenas com Projetos Open Source
afonsopacifer
1
110
Guia para se tornar uma Pessoa Desenvolvedora Front-end Especialista
afonsopacifer
0
110
O CAMINHO PARA SE TORNAR UM(A) MESTRE(A) DOS ESTILOS COM CSS LV 5.
afonsopacifer
0
220
HTML 5.3: O que existe além de a11y e SEO?
afonsopacifer
0
210
State of JS 2022
afonsopacifer
0
320
Welcome CSS LV5
afonsopacifer
0
260
Other Decks in Programming
See All in Programming
Agentic Elixir
whatyouhide
0
440
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
150
20260514_its_the_context_window_stupid.pdf
heita
0
680
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
430
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
660
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
150
Programming with a DJ Controller — not vibe coding
m_seki
3
800
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
350
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
Making the RBS Parser Faster
soutaro
0
670
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
WENDY [Excerpt]
tessaabrams
10
37k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
260
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Documentation Writing (for coders)
carmenintech
77
5.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
200
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
360
Transcript
afonsopacifer.github.io Recriando o React do Zero em 10 minutos 1
afonsopacifer.github.io
Afonso Pacifer @afonsopacifer afonsopacifer.github.io DevRel & Front-End Specialist 2
Como usar o React? Sem create react app ou vite!
index.js import React . from “react" import ReactDom . from
“react-dom" Inst al l $ npm install react $ npm install react-dom
const Element = React.createElement( 'h1', { className: ‘sampa' }, 'Hello
World' ); Comp on ent HelloWorld.js ?
const Element = React.createElement( … } ReactDOM.render( Element, document.getElementById(‘app’) );
<div id=”app”><div/> Hello World index.js index.html Rend e
Por que usar?
Não toca no DOM
None
None
Duas funções
.component( ) JS const Element = component( 'h1', { id:
‘sampa' }, 'Hello' ); OBJ { type: 'h1', props: { id: ‘samba' }, children: [‘Hello'] }
.render( ) JS render( OBJ, document.getElementById(‘app’) ); <h1 id=”sampa”> Hello
<h1/> DOM API Hello
Exemplo
.map( )
Não toca no DOM?
OBJ { type: 'h1', props: {id: “app”}, children: [] }
New OBJ { type: ‘h2', props: {id: “app”}, children: [] } JS component( 'h1', { id: ‘sampa' }, 'Hello' ) JS render( OBJ, document.getElementById(‘app’) ); Diff <div id=”app”><div/>
Virtual DOM
Virtual DOM DOM
None
Developer Experience
None
const Element = ( <div> <h1>Hello, world!</h1> </div> ); const
HelloWorld = () => ( <div> <Element/> </div> ); HelloWorld.js JSX
… 24
fronti n .j s fronti n .j s github.com/afonsopacifer/frontinjs $
npm install frontinjs Functional and stateless component library
fronti n .j s fronti n .j s github.com/afonsopacifer/frontinjs
27 "Não se limite a ser apenas um(a) Dev React,
seja um(a) Dev Front-End” - Afonso Pacifer
@afonsopacifer Obrigado Front in Sampa afonsopacifer.github.io 28