SlideShare a Scribd company logo
Vue-next
Vitalii Ratyshnyi
Front-end developer, YouWe
Front-end developer at YouWe
UX-guy
Busy with POS-plaform using Vue
2/37
Agenda
• Reactivity as heart of Vue
• Vue cant!
• Future of Vue
3 /37
What is reactivity?
4 /37
Vue Reactivity system
5 /37
Vue Reactivity
6 /37
…
data () {
msg: ‘Click to start’
},
mounted () {
console.log(‘this.data’, this._data);
},
…
Vue Reactivity
7 /37
What if property not in data()?
8 /37
data () {
cart: {}
},
…
addProductToCart () {
this.cart.products = [{
id: 1,
name: 'Jacket',
quantity: 1
}, …]
}
What if property not in data()?
9 /37
10 /37
Properties missed in data ()
!==
Reactive
11 /37
Observing objects in ES5
12 /37
OBJECTADD PROP
DELETE PROP
SET
GET
Observing arrays in ES5
13 /37
this.items[indexOfItem] = newValue
this.items.length = newLength;
Vue.set/this.$set
14 /37
Vue.set(object, key, value)
Vue.set/this.$set
15 /37
data () {
},
addProductToCart () {
this.$set(this._data, ‘cart’, {});
}
[Vue warn]
16 /37
Avoid adding reactive properties to a Vue instance or its
root $data at runtime - declare it upfront in the data
option.
Vue next
this.$set()
18 /37
data () {
cart: {}
},
mounted () {
this.$set(this.cart, ‘products’,[{…},…]);
},
…
this.$set()
19 /37
Vue next
21/60
22/60
23/37
https://github.com/vuejs/roadmap
ES6 Proxy
24/37
Objectget Proxy
ES6 Proxy
25/37
ES6 Proxy
26/37
let proxy = new Proxy(target, handler);
ES6 Proxy target
27/37
let data = {}; // target
ES6 Proxy handler
28/37
const handler = {
set (target, propKey, value) {
…
},
get (target, propKey){},
delete(target, propKey) {},
apply(target, context, args)
}
ES6 Proxy all together
29/37
let data = {}; // target
const handler = {
set (obj, prop, value) {
if (obj[prop] !== value) {
obj[prop] = value;
notifyDataChanged();
}
}
data = new Proxy(data,handler);
ES6 Proxy
30/37
data = new Proxy(…);
data.cart = {
products: []
};
// notifyDataChanged receives changes on
state
ES6 Proxy Problems
31/60
https://caniuse.com/#search=proxy
What about IE?
Vue next
Conclusions
34/37
• Proxy gives ability to build correct reactive system
• Don’t need use monkey-patching for arrays!
• V8 optimizations for proxies
Vue next
36
Contacts
Vitalii Ratyshnyi
Email: v.ratyshnij@gmail.com
Skype: misreadable
Russian-speaking Vue telegram-chat: @vuejs_ru

More Related Content

What's hot (20)

PDF
Workshop 22: React-Redux Middleware
Visual Engineering
 
PDF
Protocol-Oriented MVVM
Natasha Murashev
 
PDF
Using React, Redux and Saga with Lottoland APIs
Mihail Gaberov
 
PDF
The Future of Futures - A Talk About Java 8 CompletableFutures
Haim Yadid
 
ODP
From object oriented to functional domain modeling
Codemotion
 
PDF
Advanced Dagger talk from 360andev
Mike Nakhimovich
 
PDF
"Migrate large gwt applications - Lessons Learned" By Harald Pehl
GWTcon
 
PDF
Protocol-Oriented MVVM (extended edition)
Natasha Murashev
 
PDF
React Native: JS MVC Meetup #15
Rob Gietema
 
PDF
Practical Protocol-Oriented-Programming
Natasha Murashev
 
PDF
Asyc flow control with javascript generators - redux-saga
Pedro Solá
 
PDF
Workshop 3: JavaScript build tools
Visual Engineering
 
PDF
Javascript Module Patterns
Nicholas Jansma
 
PDF
Deep Dive into React Hooks
Felix Kühl
 
PDF
Best Practices in Qt Quick/QML - Part 4
ICS
 
PDF
Asynchronous programming done right - Node.js
Piotr Pelczar
 
PDF
Workshop 14: AngularJS Parte III
Visual Engineering
 
ODP
CompletableFuture
koji lin
 
ODP
Concurrent Programming in Java
Ruben Inoto Soto
 
PPTX
Angular2 + rxjs
Christoffer Noring
 
Workshop 22: React-Redux Middleware
Visual Engineering
 
Protocol-Oriented MVVM
Natasha Murashev
 
Using React, Redux and Saga with Lottoland APIs
Mihail Gaberov
 
The Future of Futures - A Talk About Java 8 CompletableFutures
Haim Yadid
 
From object oriented to functional domain modeling
Codemotion
 
Advanced Dagger talk from 360andev
Mike Nakhimovich
 
"Migrate large gwt applications - Lessons Learned" By Harald Pehl
GWTcon
 
Protocol-Oriented MVVM (extended edition)
Natasha Murashev
 
React Native: JS MVC Meetup #15
Rob Gietema
 
Practical Protocol-Oriented-Programming
Natasha Murashev
 
Asyc flow control with javascript generators - redux-saga
Pedro Solá
 
Workshop 3: JavaScript build tools
Visual Engineering
 
Javascript Module Patterns
Nicholas Jansma
 
Deep Dive into React Hooks
Felix Kühl
 
Best Practices in Qt Quick/QML - Part 4
ICS
 
Asynchronous programming done right - Node.js
Piotr Pelczar
 
Workshop 14: AngularJS Parte III
Visual Engineering
 
CompletableFuture
koji lin
 
Concurrent Programming in Java
Ruben Inoto Soto
 
Angular2 + rxjs
Christoffer Noring
 

Similar to Vue next (8)

PDF
From User Action to Framework Reaction
jbandi
 
PDF
From User Action to Framework Reaction
jbandi
 
PDF
From User Action to Framework Reaction
Jonas Bandi
 
PDF
Vue.js is boring - and that's a good thing
Joonas Lehtonen
 
PDF
Reactive programming with RxJS - Taiwan
modernweb
 
PDF
Introduction to VueJS & Vuex
Bernd Alter
 
PDF
Progressive Javascript: Why React when you can Vue?
Sonal Raj
 
PPTX
Vue Vuex 101
LocNguyen362
 
From User Action to Framework Reaction
jbandi
 
From User Action to Framework Reaction
jbandi
 
From User Action to Framework Reaction
Jonas Bandi
 
Vue.js is boring - and that's a good thing
Joonas Lehtonen
 
Reactive programming with RxJS - Taiwan
modernweb
 
Introduction to VueJS & Vuex
Bernd Alter
 
Progressive Javascript: Why React when you can Vue?
Sonal Raj
 
Vue Vuex 101
LocNguyen362
 
Ad

Recently uploaded (20)

PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
Ad

Vue next