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
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
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
880
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
golang-bob.pdf
iwatsukayura
0
130
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
190
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
sbt 2.0: takeoff
eed3si9n
0
160
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
Workers Cache を知る
syumai
0
360
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Statistics for Hackers
jakevdp
799
230k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Done Done
chrislema
187
17k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
WENDY [Excerpt]
tessaabrams
14
40k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
The Language of Interfaces
destraynor
162
27k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
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> ) } }