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
85
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
65
Open Source e Developer Experience
afonsopacifer
1
91
Conhecendo a área de Developer Experience (DevEx)
afonsopacifer
0
76
Do Zero ao Sênior Apenas com Projetos Open Source
afonsopacifer
1
81
Guia para se tornar uma Pessoa Desenvolvedora Front-end Especialista
afonsopacifer
0
81
O CAMINHO PARA SE TORNAR UM(A) MESTRE(A) DOS ESTILOS COM CSS LV 5.
afonsopacifer
0
190
HTML 5.3: O que existe além de a11y e SEO?
afonsopacifer
0
180
State of JS 2022
afonsopacifer
0
290
Welcome CSS LV5
afonsopacifer
0
230
Other Decks in Programming
See All in Programming
Pythonに漸進的に型をつける
nealle
1
150
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
320
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
110
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
280
Introduce Hono CLI
yusukebe
6
3.3k
contribution to astral-sh/uv
shunsock
0
580
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.4k
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
220
EMこそClaude Codeでコード調査しよう
shibayu36
0
550
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
2k
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
210
KoogではじめるAIエージェント開発
hiroaki404
1
260
Featured
See All Featured
Docker and Python
trallard
46
3.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
650
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Being A Developer After 40
akosma
91
590k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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