Vue 3.0 Updates Evan You VueConf TO, Nov. 2018.

Slides:



Advertisements
Similar presentations
J0 1 Marco Ronchetti - Web architectures – Laurea Specialistica in Informatica – Università di Trento Java XML parsing.
Advertisements

SYDJS July What is HaXe? Multi-platform language Open source ( Community driven Version 2.07 (around since 2005) Single syntax for.
1 Mind Visual Diff An architecture comparison tool December 16 th, 2014 – v0.2.2 Seyvoz Stephane Assystem.
Coding Standard: General Rules 1.Always be consistent with existing code. 2.Adopt naming conventions consistent with selected framework. 3.Use the same.
Android Platform Overview (1)
CSE506: Operating Systems Block Cache. CSE506: Operating Systems Address Space Abstraction Given a file, which physical pages store its data? Each file.
Iterators T.J. Niglio Computer & Systems Engineering Fall 2003 Software Design & Documentation Object Behavioral.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Eagle: Maturation and Evolution 17th Annual Tcl Conference Joe Mistachkin.
© Keren Kalif Advanced Java Topics Written by Keren Kalif, Edited by Liron Blecher.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Singleton Pattern. Problem Want to ensure a single instance of a class, shared by all uses throughout a program Context Need to address initialization.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
Getting Started with Angular 2 and TypeScript Nebraska.Code() 2016 Spencer Schneidenbach Ryvit.
Collections ABCD ABCD Head Node Tail Node array doubly linked list Traditional Arrays and linked list: Below is memory representation of traditional.
Slice & dice the Web with XmlPL, The XML Processing Language A presentation for Boise Code Camp 2007 Joseph Coffland Cauldron Development LLC.
September 24th 2006, aKademy The Design and Implementation of KJSEmbed Richard Moore,
Advanced Topics in Concurrency and Reactive Programming: React
DHTML.
Building Desktop Apps with Node.js and Electron
Using Ada-C/C++ Changer as a Converter Automatically convert to C/C++ to reuse or redeploy your Ada code Eliminate the need for a costly and.
The architecture of the P416 compiler
Current Generation Hypervisor Type 1 Type 2.
/* LIFE RUNS ON CODE*/ Konstantinos Pantos Microsoft MVP ASP.NET
Chapter 16 UML Class Diagrams.
Compiler Construction (CS-636)
Andy Wang Object Oriented Programming in C++ COP 3330
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Play Framework: Introduction
Node.js Express Web Services
Basic Data Structures.
Haskell programming language.
Chapter 14 Instruction Level Parallelism and Superscalar Processors
Week 11 - Friday CS221.
Whole program compilation for embedded software: the ADSL experiment
Compsci 201 Priority Queues & Autocomplete
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
CMPE419 Mobile Application Development
Not Sure how you Should React
ITEC 2620M Introduction to Data Structures
– Introduction to Object Technology
Seamless Upgrade to Angular 5. Team at Google released the new version of angular that is Angular 5.0.0, pentagonal-donut. The main three insights that.
Introduction to Classes
Arrays and Linked Lists
AVG 24th 2015 ADVANCED c# - part 1.
Advanced Topics in Concurrency and Reactive Programming: React
Optimizing MapReduce for GPUs with Effective Shared Memory Usage
Ch. 8 Priority Queues And Heaps
Computer Organization and Design Assembly & Compilation
Java for IOI.
..
CACHE-CONSCIOUS INDEXES
Trace-based Just-in-Time Type Specialization for Dynamic Languages
CS5220 Advanced Topics in Web Programming Angular – TypeScript
Eagle: Maturation and Evolution
Angular 2 Michael C. Kang.
EE 312 Final Exam Review.
CS5220 Advanced Topics in Web Programming Angular – TypeScript
Subtype Substitution Principle
Web Client Side Technologies Raneem Qaddoura
CMPE419 Mobile Application Development
CSc 453 Interpreters & Interpretation
JIT Compiler Design Maxine Virtual Machine Dhwani Pandya
Running C# in the browser
Концепты VueJS для backend разработчиков
ONAP Architecture Principle Review
SharePoint Saturday Kansas City October 19, 2019
Presentation transcript:

Vue 3.0 Updates Evan You VueConf TO, Nov. 2018

What’s coming in Vue 3.0 Make it faster Make it smaller Make it more maintainable Make it easier to target native Make your life easier

Make it faster

Virtual DOM implementation re-written from the ground up Up to 100% faster mounting & patching

More compile-time hints to reduce runtime overhead

Component fast path + Monomorphic calls + Children type detection Template Compiler output render() { const Comp = resolveComponent('Comp', this) return createFragment([ createComponentVNode(Comp, null, null, 0 /* no children */), createElementVNode('div', null, [ createElementVNode('span', null, null, 0 /* no children */) ], 2 /* single vnode child */) ], 8 /* multiple non-keyed children */) } <Comp></Comp> <div> <span></span> </div> Skip unnecessary condition branches Easier for JavaScript engine to optimize

Optimized Slots Generation Template Compiler output render() { return h(Comp, null, { default: () => [h('div', this.hello)] }, 16 /* compiler generated slots */) } <Comp> <div>{{ hello }}</div> </Comp> Ensure dependencies are tracked by correct instance Avoid unnecessary parent / children re-renders

Static Tree Hoisting Template Compiler output const __static1 = h('span', { class: 'foo' }, 'static') render() { return h('div', [ __static1, h('span', this.dynamic) ]) } <div> <span class="foo"> Static </span> <span> {{ dynamic }} </div> Skip patching entire trees Works even with multiple occurrences

Static Props Hoisting Template Compiler output const __props1 = { id: 'foo', class: 'bar' } render() { return h('div', __props1, this.text) <div id="foo" class="bar"> {{ text }} </div> Skip patching the node itself, but keep patching children

Inline Handler Hoisting Template Compiler output <Comp @event="count++"/> import { getBoundMethod } from 'vue' function __fn1 () { this.count++ } render() { return h(Comp, { onEvent: getBoundMethod(__fn1, this) }) Avoid unnecessary re-renders due to different inline function identity

Proxy-based observation mechanism with full language coverage + better perf Property addition / deletion Array index / length mutation Map, Set, WeakMap, WeakSet Classes

Faster instance property proxying using native Proxy Bye Object.defineProperty!

Up to 100% faster Component instance initialization

Double the speed Half the memory usage

v2.5 v3.0-proto Rendering 3000 stateful component instances Double the speed across the board. Reduces memory usage by half Rendering 3000 stateful component instances

Make it smaller

Tree-shaking Friendly Built-in components (keep-alive, transition…) Template directive runtime helpers (v-model, v-for…) Utility functions (asyncComponent, mixins, memoize...)

New core runtime: ~10kb gzipped

Make it more maintainable

Flow -> TypeScript

Decoupled Packages

Compiler Rewrite Pluggable architecture Parser w/ location info (source maps!) Serve as infrastructure for more robust IDE support

Make it easier to target native

Custom Renderer API import { createRenderer } from '@vue/runtime-core' const { render } = createRenderer({ nodeOps, patchData })

Make your life easier

Exposed reactivity API import { observable, effect } from 'vue' const state = observable({ count: 0 }) effect(() => { console.log(`count is: ${state.count}`) }) // count is: 0 state.count++ // count is: 1

Easily identify why a component is re-rendering const Comp = { render(props) { return h('div', props.count) }, renderTriggered(event) { debugger } Demo

Improved TypeScript Support w/ TSX interface HelloProps { text: string } class Hello extends Component<HelloProps> { count = 0 render() { return <div> {this.count} {this.$props.text} </div> Demo

Better warning traces Now includes functional components Inspectable props Traces are available in more warning cases Demo

Experimental Hooks API Demo

Experimental Time Slicing Support Demo

But how about IE? TL;DR: IE11 will be supported

Thank you!