SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
Vue.js Component Tools | @vannsl
Vue.js Component Tools
Vanessa Böhner
Frontend Developer, Munich
@vannsl
@vannsl
vannsl.io
Vue.js Component Tools | @vannsl
Core Features
• Single File Components

• Declarative Rendering
Vue.js Component Tools | @vannsl
CTA Button
active disabled
Vue.js Component Tools | @vannsl
CTA Button HTML
active disabled
Vue.js Component Tools | @vannsl
CTA Button CSS
Vue.js Component Tools | @vannsl
CTA Button JS
Vue.js Component Tools | @vannsl
Project structure
styles.css
index.html
script.js
Vue.js Component Tools | @vannsl
Project structure
styles.css
example1.html
example2.html
example3.html
example1.js
example2.js
example3.js
Vue.js Component Tools | @vannsl
Relaunch / Redesign
Vue.js Component Tools | @vannsl
+ CSS & JS changes
Vue.js Component Tools | @vannsl
Project structure
styles.css
example1.html
example2.html
example3.html
example1.js
example2.js
example3.js
Vue.js Component Tools | @vannsl
Single File
Components
Vue.js Component Tools | @vannsl
Single File Component
Vue.js - Single File Component
Vue.js Component Tools | @vannsl
SFC - Template
curly braces
v-if / v-else
v-for
Vue.js Component Tools | @vannsl
Declarative Rendering
Vue - Reactive Data Binding
Vue.js Component Tools | @vannsl
SFC - Template - Alternatives
Vue.js - Render function
Use render functions or JSX
Vue.js Component Tools | @vannsl
SFC - Script
imports
name
components
props
data
methods
render
…
Lifecycle Hooks:
created
mounted
updated
destroyed
Vue.js Component Tools | @vannsl
Component Lifecycle
The Vue Instance
Vue.js Component Tools | @vannsl
SFC - Style
Vue.js Component Tools | @vannsl
Project structure
styles.css
example1.html
example2.html
example3.html
example1.js
example2.js
example3.js
CTA.vue
Vue.js Component Tools | @vannsl
Small Reusable Components
Vue - Composing with Components
Single File Components
Vue.js Component Tools | @vannsl
CTA.vue - Template
Vue.js Component Tools | @vannsl
CTA.vue - Script
Vue.js Component Tools | @vannsl
CTA.vue - Style
Vue.js Component Tools | @vannsl
One week after Relaunch
CTA.vue
CTAGhost.vue
Vue.js Component Tools | @vannsl
DRY
🤔
Vue Composing Components | @vannsl
Vue.js Component Tools | @vannsl
Code
Reusability
Vue.js Component Tools | @vannsl
Vue Extend
😐
Vue.js Component Tools | @vannsl
Extends
Vue.js Component Tools | @vannsl
Vue.js Component Tools | @vannsl
Vue Mixins
😍
Vue.js Component Tools | @vannsl
cta-mixin.js
Vue.js Component Tools | @vannsl
CTA.vue with cta-mixin
Vue.js Component Tools | @vannsl
Mixins: Merging & Overlapping
CTA.vue, using cta-mixin.js
Vue.js Component Tools | @vannsl
Dynamic Content in Parent
Box with CTA.vue Component Box with CTAGhost.vue Component
Vue.js Component Tools | @vannsl
Box.vue BoxGhost.vue
DRY
🤔
Vue Composing Components | @vannsl
Vue.js Component Tools | @vannsl
Vue Slots
😍
Vue.js Component Tools | @vannsl
Composing Components
Vue.js Component Tools | @vannsl
Box.vue
Vue.js Component Tools | @vannsl
Slots (Parent)
Vue.js Component Tools | @vannsl
Slots
• Named Slots
Vue.js Component Tools | @vannsl
Slots
• Named Slots• Named Slots 

• Default Content
Vue.js Component Tools | @vannsl
Tools
Extend (nope)
Mixins (if appropriate)
Slots (yeah!)
Vue.js Component Tools | @vannsl
More Tools / Pattern
Filter
Plugins
Directives
*
Compound Components
Scoped Slots (Renderless Components)
Advanced Vue.js Component Tools | @vannsl
Thanks 🙏Thanks 🙏

Weitere ähnliche Inhalte

Was ist angesagt?

SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
Sébastien Levert
 
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
Sébastien Levert
 
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
Sébastien Levert
 
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
Sébastien Levert
 

Was ist angesagt? (20)

Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
 
A Lap around ASP.NET 5 - CONDG
A Lap around ASP.NET 5 - CONDGA Lap around ASP.NET 5 - CONDG
A Lap around ASP.NET 5 - CONDG
 
Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI
 
December 2014: The best tips to remember when launching your site
December 2014: The best tips to remember when launching your siteDecember 2014: The best tips to remember when launching your site
December 2014: The best tips to remember when launching your site
 
Serverless computing con Azure Functions
Serverless computing con Azure FunctionsServerless computing con Azure Functions
Serverless computing con Azure Functions
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLI
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
 
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
 
A Tale of 3 CLIs - Angular 2, Ember, and React
A Tale of 3 CLIs - Angular 2, Ember, and ReactA Tale of 3 CLIs - Angular 2, Ember, and React
A Tale of 3 CLIs - Angular 2, Ember, and React
 
Frontend as a first class citizen
Frontend as a first class citizenFrontend as a first class citizen
Frontend as a first class citizen
 
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
 
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
 
Untangle Your Front End Development with Visual Studio 2015
Untangle Your Front End Development with Visual Studio 2015Untangle Your Front End Development with Visual Studio 2015
Untangle Your Front End Development with Visual Studio 2015
 
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
European SharePoint Conference 2017 - SharePoint Framework, Angular & Azure F...
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTOWordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTO
 
Angular CLI : HelloWorld
Angular CLI : HelloWorldAngular CLI : HelloWorld
Angular CLI : HelloWorld
 
BuildStatus - PiterJS #1
BuildStatus - PiterJS #1BuildStatus - PiterJS #1
BuildStatus - PiterJS #1
 
Google Map Code
Google Map CodeGoogle Map Code
Google Map Code
 
Building a Headless Shop
Building a Headless ShopBuilding a Headless Shop
Building a Headless Shop
 
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
 

Ähnlich wie Vue.js Component Tools

SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5
Usman Zafar Malik
 

Ähnlich wie Vue.js Component Tools (20)

Vue+rails
Vue+railsVue+rails
Vue+rails
 
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best Practices
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
 
Vue.js
Vue.jsVue.js
Vue.js
 
Angular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFxAngular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFx
 
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ..."Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
 
12 asp.net session17
12 asp.net session1712 asp.net session17
12 asp.net session17
 
How to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScriptHow to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScript
 
16 asp.net session23
16 asp.net session2316 asp.net session23
16 asp.net session23
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
Creative Use of Widgets for Content Management
Creative Use of Widgets for Content ManagementCreative Use of Widgets for Content Management
Creative Use of Widgets for Content Management
 
Passionate People Meetup - React vs Vue with a deepdive into Proxies
Passionate People Meetup - React vs Vue with a deepdive into ProxiesPassionate People Meetup - React vs Vue with a deepdive into Proxies
Passionate People Meetup - React vs Vue with a deepdive into Proxies
 
Building a Single Page Application with VueJS
Building a Single Page Application with VueJSBuilding a Single Page Application with VueJS
Building a Single Page Application with VueJS
 
Visualforce report
Visualforce reportVisualforce report
Visualforce report
 
LvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemLvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design System
 
SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
 
How to optimize the performance of vue js large application structure
How to optimize the performance of vue js large application structure How to optimize the performance of vue js large application structure
How to optimize the performance of vue js large application structure
 
Enhancing performance in an open-source CMS ecosystem
Enhancing performance in an open-source CMS ecosystemEnhancing performance in an open-source CMS ecosystem
Enhancing performance in an open-source CMS ecosystem
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Vue.js Component Tools