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
100
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
77
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
94
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
190
State of JS 2022
afonsopacifer
0
310
Welcome CSS LV5
afonsopacifer
0
240
Other Decks in Programming
See All in Programming
CSC307 Lecture 08
javiergs
PRO
0
690
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
150
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
570
文字コードの話
qnighy
36
14k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
390
2025年の活動の振り返り
hideg
0
110
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
420
CSC307 Lecture 09
javiergs
PRO
1
850
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
130
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
350
ぼくの開発環境2026
yuzneri
1
280
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
190
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
180
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
The Invisible Side of Design
smashingmag
302
51k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
450
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Into the Great Unknown - MozCon
thekraken
40
2.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
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