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
84
Como otimizar seu site com lighthouse e core web vitals
juunegreiros
0
440
Introdução ao Git
juunegreiros
0
60
Webpacker e a Jornada do Heroi
juunegreiros
0
34
Sopa de Letrinhas CSS | Alphabet soup CSS
juunegreiros
1
78
Pensando logicamente: introdução à lógica de programação | Thinking logically: introduction to programming logic
juunegreiros
0
66
Carreiras em TI
juunegreiros
0
60
Javascript, um menino serelepe | Javascript, a serelepe guy
juunegreiros
0
270
Other Decks in Technology
See All in Technology
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
12
3.8k
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
1.7k
バクラクのSREにおけるAgentic AIへの挑戦/Our Journey with Agentic AI
taddy_919
2
1.1k
DevOpsエージェントで実現する!! AWS Well-Architected(W-A) を実現するシステム設計 / 20260307 Masaki Okuda
shift_evolve
PRO
3
250
Serverless Agent Architecture on Azure / serverless-agent-on-azure
miyake
1
160
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
8
2.9k
Datadog の RBAC のすべて
nulabinc
PRO
3
310
EMからVPoEを経てCTOへ:マネジメントキャリアパスにおける葛藤と成長
kakehashi
PRO
9
1.2k
Kiro のクレジットを使い切る!
otanikohei2023
0
120
「ストレッチゾーンに挑戦し続ける」ことって難しくないですか? メンバーの持続的成長を支えるEMの環境設計
sansantech
PRO
3
380
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
22k
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
200
It's Worth the Effort
3n
188
29k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
Designing Powerful Visuals for Engaging Learning
tmiket
0
260
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
97
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
470
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Visualization
eitanlees
150
17k
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!