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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Afonso Pacifer
July 29, 2023
Programming
140
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
110
Open Source e Developer Experience
afonsopacifer
1
160
Conhecendo a área de Developer Experience (DevEx)
afonsopacifer
0
130
Do Zero ao Sênior Apenas com Projetos Open Source
afonsopacifer
1
130
Guia para se tornar uma Pessoa Desenvolvedora Front-end Especialista
afonsopacifer
0
130
O CAMINHO PARA SE TORNAR UM(A) MESTRE(A) DOS ESTILOS COM CSS LV 5.
afonsopacifer
0
240
HTML 5.3: O que existe além de a11y e SEO?
afonsopacifer
0
220
State of JS 2022
afonsopacifer
0
350
Welcome CSS LV5
afonsopacifer
0
280
Other Decks in Programming
See All in Programming
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
110
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
310
Foundation Models frameworkで画像分析
ryodeveloper
1
600
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
650
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
150
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
340
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
The Curse of the Amulet
leimatthew05
2
14k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
RailsConf 2023
tenderlove
30
1.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
430
Optimising Largest Contentful Paint
csswizardry
37
3.9k
The agentic SEO stack - context over prompts
schlessera
0
860
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
680
GitHub's CSS Performance
jonrohan
1033
470k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
450
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