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
React para Todos
Search
Matheus Calegaro
January 17, 2019
Programming
80
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React para Todos
Matheus Calegaro
January 17, 2019
More Decks by Matheus Calegaro
See All by Matheus Calegaro
GraphQL, uma introdução
mathcale
0
26
Adicionando Super Poderes de Backend em seus Projetos Vue com Serverless e Now
mathcale
0
61
React Hooks - Componentes funcionais (mais) inteligentes
mathcale
0
55
Começando com Git e Controle de Versão de Software
mathcale
0
69
Zero to Hero - Como se Tornar um Desenvolvedor Web Moderno
mathcale
0
110
Other Decks in Programming
See All in Programming
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
740
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
Security issues being discussed on Web Platforms
petamoriken
0
860
Jetpack Compose メカニズム
skydoves
0
290
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
180
A2UI for Android: Safely Rendering AI-Generated UI with Jetpack Compose - DroidKaigi 2026
itsmedreamwalker
0
100
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
450
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
130
Intent as Code
shoppingjaws
6
970
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
380
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
120
アクセシビリティから考える情報設計
high_g_engineer
0
370
Featured
See All Featured
Paper Plane
katiecoart
PRO
3
53k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
930
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
GitHub's CSS Performance
jonrohan
1033
470k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
How to build a perfect <img>
jonoalderson
1
6k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Balancing Empowerment & Direction
lara
6
1.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
Transcript
REACT PARA TODOS!
Olá, me chamo Matheus Calegaro Dev @ Hit - B2W
Digital RJ
O que é React? Biblioteca para construção de interfaces baseadas
em Componentes
None
Exemplo de um componente import React, { Component } from
'react' export default class Hello extends Component { render() { return ( <div> <h1>Hello, World!</h1> </div> ) } }
Conceitos Básicos Componente Virtual DOM Props State Lifecycle Methods
Virtual DOM Representação do DOM real em um objeto JavaScript
na memória; Computação das diferenças (diff) entre o DOM real e o VDOM; Aplicação de patch para atualizar o DOM real conforme o novo estado do VDOM.
None
Props Atributos especí cos de cada componente
import React, { Component } from 'react' export default class
SayHello extends Component { render() { const { name } = this.props return <h1>Hello, { name }</h1> } } import React, { Component } from 'react' import SayHello from './SayHello' export default class App extends Component { render() { return ( <div> <SayHello name="Matheus" /> </div> ) } }
State Lugar onde os dados existem e se transformam ao
longo do tempo
import React, { Component } from 'react' export default class
ExemploState extends Component { state = { user: { name: 'Matheus', email: '
[email protected]
', isCool: true } } render() { const { user } = this.state return ( <ul> <li>{user.name}</li> <li>{user.email}</li> <li>{user.isCool ? 'You\'re cool :)' : 'Not cool :('}</li> </ul> ) } }
Ciclo de Vida Um componenete "nasce", "cresce" e "morre" (assim
como nós!)
None
Curti! Mas como faço para começar a escrever meus primeiros
componentes? Х
Node npm/yarn Estar em dia com o ES6/ESNext Create React
App ( npm i -g create-react-app ) ou codesandbox.io Vontade de aprender!
Code Time! ۫
import React, { Component } from 'react' export default class
Obrigado extends Component { render() { return ( <div> <h1>Muito obrigado! ȶ </h1> <p>https://github.com/mathcale/quinta-as-cinco</p> </div> ) } }