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
90
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
85
Pensando logicamente: introdução à lógica de programação | Thinking logically: introduction to programming logic
juunegreiros
0
71
Carreiras em TI
juunegreiros
0
63
Javascript, um menino serelepe | Javascript, a serelepe guy
juunegreiros
0
280
Other Decks in Technology
See All in Technology
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
220
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.6k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
20k
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.5k
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.4k
Model Studio CLI × Token Plan
maigo999
0
190
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
6
1.4k
What's new in Go 1.27?
ciarana
0
240
TypeScript入門 2026
recruitengineers
PRO
3
680
My broken English still works: speaking at global OSS events
naruoga
0
110
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
420
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
800
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
A Tale of Four Properties
chriscoyier
163
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
A better future with KSS
kneath
240
18k
Being A Developer After 40
akosma
91
590k
Are puppies a ranking factor?
jonoalderson
1
3.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
710
How to Think Like a Performance Engineer
csswizardry
28
2.7k
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!