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
Afonso Pacifer
July 29, 2023
Programming
0
110
Recriando o React do Zero em 10 minutos
Front in Sampa 2023
Afonso Pacifer
July 29, 2023
Tweet
Share
More Decks by Afonso Pacifer
See All by Afonso Pacifer
Developer Experience (DevEx) no mundo Front-End: Do Ruby ao Next.js
afonsopacifer
0
80
Open Source e Developer Experience
afonsopacifer
1
130
Conhecendo a área de Developer Experience (DevEx)
afonsopacifer
0
100
Do Zero ao Sênior Apenas com Projetos Open Source
afonsopacifer
1
100
Guia para se tornar uma Pessoa Desenvolvedora Front-end Especialista
afonsopacifer
0
97
O CAMINHO PARA SE TORNAR UM(A) MESTRE(A) DOS ESTILOS COM CSS LV 5.
afonsopacifer
0
200
HTML 5.3: O que existe além de a11y e SEO?
afonsopacifer
0
200
State of JS 2022
afonsopacifer
0
310
Welcome CSS LV5
afonsopacifer
0
250
Other Decks in Programming
See All in Programming
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
480
AI活用のコスパを最大化する方法
ochtum
0
120
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
210
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
200
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
920
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
280
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
130
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
Unity6.3 AudioUpdate
cova8bitdots
0
110
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
330
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
360
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
470
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
140
Docker and Python
trallard
47
3.8k
The Language of Interfaces
destraynor
162
26k
Everyday Curiosity
cassininazir
0
150
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
84
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
80
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
280
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
370
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