Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ReactJS Starter
Search
Gefy Marcos
November 22, 2022
Programming
0
31
ReactJS Starter
Palestra realizada durante o november tech, no Senac, Tubarão - SC em 11/2022.
Gefy Marcos
November 22, 2022
Tweet
Share
More Decks by Gefy Marcos
See All by Gefy Marcos
Desbravando a Carreira em Desenvolvimento: Dicas e Estratégias para iniciantes
gefymarcos
0
22
Zod: Levando a validação de dados a um novo nível.
gefymarcos
0
1.5k
Clean Code: Boas práticas e design de código
gefymarcos
0
150
Web to PWA!
gefymarcos
0
69
React Native por onde começar
gefymarcos
0
150
Other Decks in Programming
See All in Programming
Strands Agents で実現する名刺解析アーキテクチャ
omiya0555
1
110
AIのメモリー
watany
11
1.1k
それ CLI フレームワークがなくてもできるよ / Building CLI Tools Without Frameworks
orgachem
PRO
15
3.4k
Workers を定期実行する方法は一つじゃない
rokuosan
0
130
0から始めるモジュラーモノリス-クリーンなモノリスを目指して
sushi0120
0
210
Claude Code派?Gemini CLI派? みんなで比較LT会!_20250716
junholee
1
760
テスターからテストエンジニアへ ~新米テストエンジニアが歩んだ9ヶ月振り返り~
non0113
2
240
バイブコーディング超えてバイブデプロイ〜CloudflareMCPで実現する、未来のアプリケーションデリバリー〜
azukiazusa1
2
740
構造化・自動化・ガードレール - Vibe Coding実践記 -
tonegawa07
0
160
Vibe Codingの幻想を超えて-生成AIを現場で使えるようにするまでの泥臭い話.ai
fumiyakume
20
9.7k
オホーツクでコミュニティを立ち上げた理由―地方出身プログラマの挑戦 / TechRAMEN 2025 Conference
lemonade_37
1
380
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
300
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
The Cult of Friendly URLs
andyhume
79
6.5k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
A better future with KSS
kneath
238
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
It's Worth the Effort
3n
185
28k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Become a Pro
speakerdeck
PRO
29
5.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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