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
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
製造業のクラウド活用最適解〜AI,DXを加速するデータ基盤の作り方〜
hamadakoji
0
430
失敗を資産に変えるClaude Code
shinyasaita
0
170
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
270
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
2.1k
On-behalf-of Token exchange with AgentCore Identity
hironobuiga
2
120
チームで実践する AI-DLC 思考の軌跡を残すチェックポイント設計
belongadmin
0
3.2k
protovalidate-es を導入してみた
bengo4com
0
160
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
8
4.5k
FDE という解 ― 暗黙知と明示知をつなぐ、伴走型エンジニアリング ―
otanet
0
100
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
360
なぜ Platform Engineering の土台に Kubernetes を選ぶのか
r4ynode
1
510
小さくはじめるSLI/SLO ~育てながら組織に定着させる実践知~ / Starting Small with SLI/SLOs: Building Adoption Through Continuous Growth
nari_ex
2
1.1k
Featured
See All Featured
Designing for Timeless Needs
cassininazir
1
250
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
330
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
720
Discover your Explorer Soul
emna__ayadi
2
1.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
610
Believing is Seeing
oripsolob
1
140
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
For a Future-Friendly Web
brad_frost
183
10k
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!