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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
継続モナドとリアクティブプログラミング
yukikurage
3
700
その節約、円になってますか?
isamumumu
1
710
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
テーブルをDELETEした
yuzneri
0
140
Foundation Models frameworkで画像分析
ryodeveloper
1
600
プロポーザルを書いてもらう
pvcresin
0
290
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
770
Go 1.27 における memory allocation の高速化
andpad
0
120
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
150
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
霧の中の代数的エフェクト
funnyycat
1
490
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Producing Creativity
orderedlist
PRO
348
40k
How STYLIGHT went responsive
nonsquared
100
6.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
470
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
660
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
Art, The Web, and Tiny UX
lynnandtonic
304
22k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
119
120k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
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