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
150
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
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
140
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
250
HTML 5.3: O que existe além de a11y e SEO?
afonsopacifer
0
240
State of JS 2022
afonsopacifer
0
360
Welcome CSS LV5
afonsopacifer
0
300
Other Decks in Programming
See All in Programming
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.5k
Domain-Driven Transformation
hschwentner
2
2.3k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
880
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.8k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
110
phperだってパンチカードでコーディングしたい
o0h
PRO
0
410
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.7k
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.5k
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
The Cult of Friendly URLs
andyhume
79
7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
490
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
640
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
59k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
580
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Side Projects
sachag
456
43k
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