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
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
120
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
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
110
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
200
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
240
霧の中の代数的エフェクト
funnyycat
1
460
今さら聞けない .NET CLI
htkym
0
180
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
480
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.5k
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.4k
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
140
Claude Team Plan導入・ガイド
tk3fftk
0
250
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
120
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
650
Side Projects
sachag
455
43k
The browser strikes back
jonoalderson
0
1.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
440
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
How to train your dragon (web standard)
notwaldorf
97
6.7k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
450
Darren the Foodie - Storyboard
khoart
PRO
3
3.5k
ラッコキーワード サービス紹介資料
rakko
1
4.2M
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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