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
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
0
230
EventBridge Connection
_kensh
5
660
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
200
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
760
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
520
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
260
Databricks における 生成AIガバナンスの実践
taka_aki
1
350
Mastering Ruby Box
tagomoris
3
150
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
190
いまさら聞けない人のためのAIコーディング入門
devops_vtj
0
130
チームで実践する AI-DLC 思考の軌跡を残すチェックポイント設計
belongadmin
0
3k
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Navigating Team Friction
lara
192
16k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Curious Case for Waylosing
cassininazir
1
380
Six Lessons from altMBA
skipperchong
29
4.3k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
エンジニアに許された特別な時間の終わり
watany
107
250k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
30 Presentation Tips
portentint
PRO
1
320
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!