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
93
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Como modularizar seu front-end sem depender de um framework
Rancho Dev 2019 (28/09/2019)
Juliana Negreiros
September 28, 2019
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
89
Como otimizar seu site com lighthouse e core web vitals
juunegreiros
0
440
Introdução ao Git
juunegreiros
0
65
Webpacker e a Jornada do Heroi
juunegreiros
0
37
Sopa de Letrinhas CSS | Alphabet soup CSS
juunegreiros
1
84
Pensando logicamente: introdução à lógica de programação | Thinking logically: introduction to programming logic
juunegreiros
0
69
Carreiras em TI
juunegreiros
0
62
Javascript, um menino serelepe | Javascript, a serelepe guy
juunegreiros
0
280
Other Decks in Technology
See All in Technology
Microsoft のサポートとフィードバック総まとめ
murachiakira
PRO
0
140
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
170
プライバシー保護の理論と実践
lycorptech_jp
PRO
1
230
背中から、背中へ /paying forward to community
naitosatoshi
0
210
製造現場での生成AIの活用、およびエージェントAIの実装のあり方、AVEVAの取り組み
iotcomjpadmin
0
220
そのタスクオンスケですか?
poropinai1966
0
110
“詰む”前に仕組みを作れ 〜技術の波に溺れないためのキャッチアップ術〜
takasyou
8
5k
AI・ロボティクスと自動化社会 / AI, Robotics, and the Automated Society
ks91
PRO
0
140
10x Speed With QA Agent Platform - How we scaled adoption from individual effort to organizational capability
lycorptech_jp
PRO
0
120
From Prompt Engineering to Loop Engineering
shibuiwilliam
1
320
はてなのサービス基盤を支える Kubernetes《足腰》
masayoshimaezawa
0
420
LiDAR SLAMの実装とセンサ融合 ~Lie群からContinuous-Time LIOまで~
naokiakai
1
850
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Practical Orchestrator
shlominoach
191
11k
Amusing Abliteration
ianozsvald
1
220
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
250
Deep Space Network (abreviated)
tonyrice
0
220
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
650
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
600
We Have a Design System, Now What?
morganepeng
55
8.2k
Building Adaptive Systems
keathley
44
3.1k
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!