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
Como modularizar seu front-end sem depender de ...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Juliana Negreiros
September 28, 2019
Technology
0
91
Como modularizar seu front-end sem depender de um framework
Rancho Dev 2019 (28/09/2019)
Juliana Negreiros
September 28, 2019
Tweet
Share
More Decks by Juliana Negreiros
See All by Juliana Negreiros
Um guia para começar no mundo Front End
juunegreiros
0
340
Desmistificando a área de TI
juunegreiros
0
85
Como otimizar seu site com lighthouse e core web vitals
juunegreiros
0
440
Introdução ao Git
juunegreiros
0
61
Webpacker e a Jornada do Heroi
juunegreiros
0
34
Sopa de Letrinhas CSS | Alphabet soup CSS
juunegreiros
1
79
Pensando logicamente: introdução à lógica de programação | Thinking logically: introduction to programming logic
juunegreiros
0
67
Carreiras em TI
juunegreiros
0
60
Javascript, um menino serelepe | Javascript, a serelepe guy
juunegreiros
0
280
Other Decks in Technology
See All in Technology
Go標準パッケージのI/O処理をながめる
matumoto
0
230
猫でもわかるKiro CLI(AI 駆動開発への道編)
kentapapa
0
260
Cortex Code CLI と一緒に進めるAgentic Data Engineering
__allllllllez__
0
430
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
230
スクリプトの先へ!AIエージェントと組み合わせる モバイルE2Eテスト
error96num
0
190
OCHaCafe S11 #2 コンテナ時代の次の一手:Wasm 最前線
oracle4engineer
PRO
2
150
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
13k
アーキテクチャモダナイゼーションを実現する組織
satohjohn
1
1.1k
AI時代の「本当の」ハイブリッドクラウド — エージェントが実現した、あの頃の夢
ebibibi
0
150
(Test) ai-meetup slide creation
oikon48
3
460
"作る"から"使われる"へ:Backstage 活用の現在地
sbtechnight
0
190
【Oracle Cloud ウェビナー】【入門編】はじめてのOracle AI Data Platform - AIのためのデータ準備&自社用AIエージェントをワンストップで実現
oracle4engineer
PRO
1
170
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
140
Deep Space Network (abreviated)
tonyrice
0
92
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Designing for Timeless Needs
cassininazir
0
170
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
480
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
290
Faster Mobile Websites
deanohume
310
31k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
74
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
78
Transcript
Como modularizar seu front-end sem depender de um framework
Juliana Negreiros @juunegreiros Alura Rails Girls Sorocaba SorocabaJS
Elaine Mattos Quinto Github @elainemattos lastfm/tt @elainemattoss
Motivações
VanillaJS <3
Fundamento
Pensar em componentes
Pensar em módulos
O que vamos fazer?
Cores e música com o Simon
None
None
13 Componentização
Pensando em componentes
None
None
None
None
Componentização Independente Fácil integração Reutilização
Mãos na massa
Setup inicial Webpack Babel
Modularização
Frameworks
React Facebook Grandes empresas usando Lib
Angular Google Grandes empresas usando Legado
Vue Evan You Popularizando++
Comparações
Componente
Sound em Vanilla export default soundNumber => { const Sound
= document.createElement('audio') Sound.setAttribute('data-sound', soundNumber) Sound.innerHTML = `<source src='https://s3.amazonaws.com/freecodecamp/simonSound${soundNum ber}.mp3'></source>` return Sound }
Sound em React export default ({ soundNumber }) => {
const url = `https://s3.amazonaws.com/freecodecamp/simonSound${soundNumber}.mp3` return ( <audio> <source src={url} ></source> </audio> ) }
Sound em Angular @Component({ selector: 'sound', template: ` <audio [src]="'https://s3.amazonaws.com/freecodecamp/simonSound'
+ soundNumber + '.mp3'`"></audio> ` }) class SoundComponent { @Input() soundNumber }
Sound em Vue <template> <audio :src={path}></audio> </template> <script> export default
{ name: 'sound', props: { soundNumber: { type: Number } }, data() { return { path: `https://s3.amazonaws.com/freecodecamp/simonSound${props.soundNumber}.mp3` } } } </script>
Gerenciamento de estado
Handler de eventos
“ Conclusão 35
Thanks!