Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
0
89
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
72
Como otimizar seu site com lighthouse e core web vitals
juunegreiros
0
430
Introdução ao Git
juunegreiros
0
55
Webpacker e a Jornada do Heroi
juunegreiros
0
24
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
63
Carreiras em TI
juunegreiros
0
56
Javascript, um menino serelepe | Javascript, a serelepe guy
juunegreiros
0
270
Other Decks in Technology
See All in Technology
AI活用によるPRレビュー改善の歩み ― 社内全体に広がる学びと実践
lycorptech_jp
PRO
1
190
計算機科学をRubyと歩む 〜DFA型正規表現エンジンをつくる~
ydah
3
220
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
230
eBPFとwaruiBPF
sat
PRO
4
2.5k
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
120
AI 駆動開発勉強会 フロントエンド支部 #1 w/あずもば
1ftseabass
PRO
0
300
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
670
意外とあった SQL Server 関連アップデート + Database Savings Plans
stknohg
PRO
0
300
第4回 「メタデータ通り」 リアル開催
datayokocho
0
120
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
520
生成AI時代の自動E2Eテスト運用とPlaywright実践知_引持力哉
legalontechnologies
PRO
0
210
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Speed Design
sergeychernyshev
33
1.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Unsuck your backbone
ammeep
671
58k
Docker and Python
trallard
47
3.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
The Cult of Friendly URLs
andyhume
79
6.7k
Designing Experiences People Love
moore
143
24k
Designing for humans not robots
tammielis
254
26k
Bash Introduction
62gerente
615
210k
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!