Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Recriando o React do Zero em 10 minutos
Search
Afonso Pacifer
July 29, 2023
Programming
170
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
Transcript
28 slides
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
More Decks by Afonso Pacifer
See All by Afonso Pacifer
Developer Experience (DevEx) no mundo Front-End: Do Ruby ao Next.js
afonsopacifer
0
130
Open Source e Developer Experience
afonsopacifer
1
180
Conhecendo a área de Developer Experience (DevEx)
afonsopacifer
0
150
Do Zero ao Sênior Apenas com Projetos Open Source
afonsopacifer
1
150
Guia para se tornar uma Pessoa Desenvolvedora Front-end Especialista
afonsopacifer
0
140
O CAMINHO PARA SE TORNAR UM(A) MESTRE(A) DOS ESTILOS COM CSS LV 5.
afonsopacifer
0
260
HTML 5.3: O que existe além de a11y e SEO?
afonsopacifer
0
240
State of JS 2022
afonsopacifer
0
370
Welcome CSS LV5
afonsopacifer
0
300
Other Decks in Programming
See All in Programming
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
200
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
200
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
190
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
210
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
180
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
370
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
160
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
580
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
1
280
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
120
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Producing Creativity
orderedlist
PRO
348
41k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
570
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing Powerful Visuals for Engaging Learning
tmiket
1
660
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k