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
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
100
Open Source e Developer Experience
afonsopacifer
1
150
Conhecendo a área de Developer Experience (DevEx)
afonsopacifer
0
120
Do Zero ao Sênior Apenas com Projetos Open Source
afonsopacifer
1
120
Guia para se tornar uma Pessoa Desenvolvedora Front-end Especialista
afonsopacifer
0
120
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
340
Welcome CSS LV5
afonsopacifer
0
270
Other Decks in Programming
See All in Programming
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
7.9k
Oxcを導入して開発体験が向上した話
yug1224
4
340
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
200
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
750
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
210
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.4k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
300
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
220
スマートグラスで並列バイブコーディング
hyshu
0
260
act1-costs.pdf
sumedhbala
0
110
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
430
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
750
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
470
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
860
How to make the Groovebox
asonas
2
2.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
A designer walks into a library…
pauljervisheath
211
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
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