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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ReactJS Starter
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Gefy Marcos
November 22, 2022
Programming
46
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ReactJS Starter
Palestra realizada durante o november tech, no Senac, Tubarão - SC em 11/2022.
Gefy Marcos
November 22, 2022
More Decks by Gefy Marcos
See All by Gefy Marcos
Desbravando a Carreira em Desenvolvimento: Dicas e Estratégias para iniciantes
gefymarcos
0
53
Zod: Levando a validação de dados a um novo nível.
gefymarcos
0
1.6k
Clean Code: Boas práticas e design de código
gefymarcos
0
170
Web to PWA!
gefymarcos
0
89
React Native por onde começar
gefymarcos
0
160
Other Decks in Programming
See All in Programming
Oxlintはいいぞ(続)
yug1224
1
560
高専キャリア LT 発表内容
crysta1221
6
5.6k
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
Press start. Python's next generation.
willingc
PRO
3
320
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
5
1.1k
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
100
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
170
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
180
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
890
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
190
Deep dive into the select statement (GopherCon UK)
jespino
0
170
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
Believing is Seeing
oripsolob
1
210
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
260
Transcript
REACTJS STARTER
Founder @code4tuba GEFY GEFFERSON MARCOS Tech Lead Frontend @ StudioSol
None
O QUE É REACT? UMA BIBLIOTECA JAVASCRIPT PARA CRIAR INTERFACES
DE USUÁRIO
Facilita a criação de UIs; Deixa o código mais previsível
e simples de depurar. DECLARATIVO
Permite criar componentes encapsulados que gerenciam seu próprio estado; Permite
deixar a lógica da aplicação fora do DOM. BASEADO EM COMPONENTES
Funciona na Web, no backend com Node e para aplicativos
com React-Native. USE EM QUALQUER LUGAR
TEM MERCADO?
QUEM USA?
HELLO WORLD
ISSO É REACT class HelloWorld extends React.Component { render() {
return <div>Hello World </ div>; } } root.render(<HelloWorld /> );
É uma extensão de sintaxe para javascript; Recomendado para escrever
a UI; JSX
No React a lógica de renderização é acoplada as outras
lógicas de UI; Manipulação de eventos; Mudança de estado; Preparação de dados pra exibição. POR QUE JSX?
EU SOU UM ARQUIVO JSX const element = <h1>Hello, world!</h1>;
O DOM é a representação de dados de uma página
web; O React criou o React DOM pra fazer a manipulação desse DOM de forma performática. RENDERIZAÇÃO DE ELEMENTOS
O React DOM compara o elemento novo e seus f
ilhos e aplica a alteração só no nó que mudou. FONTE: HTTPS://CODEPEN.IO/GAEARON/PEN/GWOJEZ?EDITORS=1010 REACT DOM
INSERINDO ELEMENTO NO DOM <div id="root"></div> const element = <h1>Hello,
world!</h1>; ReactDOM.render( element, document.getElementById('root') ); .html .js
class HelloWorld extends React.Component { render() { return <div>Hello World
</ div>; } } root.render(<HelloWorld /> );
FONTE: HTTPS://BABELJS.IO/REPL BABEL
class HelloWorld extends React.Component { render() { return /*#__PURE__*/React.createElement("div", null,
"Hello World"); } } root.render( /*#__PURE__*/React.createElement(HelloWorld, null));
COMPONENTE DECLARATIVO function Welcome() { return <h1>Hello World</h1>; } class
Welcome extends React.Component { render() { return <h1>Hello World</h1>; } }
COMPONENTE DECLARATIVO const element = <h1>Hello, world!</h1>; ReactDOM.render( element, document.getElementById('root')
); <div id="root"></div>
COMPONENTE DECLARATIVO const element = <Welcome />; ReactDOM.render( element, document.getElementById('root')
); <div id="root"></div>
COMPONENTE DECLARATIVO ReactDOM.render( <Welcome />, document.getElementById('root') ); <div id="root"></div>
Props são imutáveis; States são mutáveis e quando seu valor
é alterado os métodos do ciclo de vida são executados. PROPS VS STATE
STATE E PROPS ReactDOM.render( <Welcome title="Senac" /> , document.getElementById('root') );
STATE E PROPS class Welcome extends React.Component { constructor(props) {
super(props); } render() { return ( <div> <h1>Hello, {this.props.title} < / h1> </ div> ); } }
STATE E PROPS class Welcome extends React.Component { constructor(props) {
super(props); } render() { return ( <div> <h1>Hello, {this.props.title} < / h1> // Hello, Senac </ div> ); } }
STATE E PROPS class Welcome extends React.Component { constructor(props) {
super(props); } render() { return ( <div> <h1>Hello, {this.props.title} < / h1> // Hello, Senac <button> {this.state.text} // undefined </ button> </ div> ); } }
STATE E PROPS class Welcome extends React.Component { constructor(props) {
super(props); this.state = { text: "não clicou" }; } render() { return ( <div> <h1>Hello, {this.props.title} < / h1> // Hello, Senac <button> {this.state.text} // não clicou </ button> </ div> ); } }
STATE E PROPS class Welcome extends React.Component { constructor(props) {
super(props); this.state = { text: "não clicou" }; } render() { return ( <div> <h1>Hello, {this.props.title} < / h1> // Hello, Senac <button onClick={() => this.setState({ text: "clicou"})} > {this.state.text} // não clicou </ button> </ div> ); } }
STATE E PROPS class Welcome extends React.Component { constructor(props) {
super(props); this.state = { text: "clicou" }; } render() { return ( <div> <h1>Hello, {this.props.title} < / h1> // Hello, Senac <button onClick={() => this.setState({ text: "clicou"})} > {this.state.text} // clicou </ button> </ div> ); } }
None
PRIMEIRO PASSO
PRIMEIRO PASSO Header
PRIMEIRO PASSO Order Options Header
PRIMEIRO PASSO Card Order Options Header
PRIMEIRO PASSO Card Title Card Image Card Description Card Info
Card Button Order Options Header Card
Jest; Typescript; React Router; Redux; Nextjs; Awesome-React. HTTPS://GITHUB.COM/ENAQX/AWESOME-REACT MUITA COISA…
FINE. I'LL DO IT MYSELF
PENSANDO DO JEITO REACT
- https://roadmap.sh/ HTTPS://GITHUB.COM/ENAQX/AWESOME-REACT ESTEJA PRONTO!
ROADMAP.SH
- https://roadmap.sh/ - https://github.com/felipe f ialho/frontend- challenges; - https://github.com/CollabCodeTech/ backend-challenges
-https://gefymarcos.com.br HTTPS://GITHUB.COM/ENAQX/AWESOME-REACT ESTEJA PRONTO!
14habits.com
OBRIGADO!
HTTPS://GITHUB.COM/GEFYMARCOS/MARVEL-REACT