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
Transcript
18 slides
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> ) } }
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
57
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
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
210
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
400
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
160
The Cost of the DOM
ypresto
2
210
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
AppFunctionsの内部実装を紐解く
hiroaki404
0
120
SODA - FACT BOOK(JP)
sodainc
1
40k
エージェントの管理もエージェントに – herdr-core と自作バックログで作る司令塔 –
nearme_tech
PRO
1
120
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
140
AIコーディングをセッションで終わらせない: PHPライブラリ開発におけるコンテキスト承継設計
ickx
0
110
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Invisible Side of Design
smashingmag
301
52k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
So, you think you're a good person
axbom
PRO
2
2.3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470