刚刚看完珠峰的面试视频,之前看了开课吧vue访谈中。就已经有初步了解vue3,有几个令人激动的新特性,除了性能有很大的提升,也通过composition,解决了部分开发过程令人不爽的地方。也很让人期待vue3的正式发布,原本计划是八月。而已经拖到9月18号了。接下来就是看涉及的生态发展如何了。


2018年2月就开始有想法。


2018年9月12 使用typescript monorepo 尝试重写的原型阶段。半年之后,有了virtrul dom runtime 基于proxy,并也支持 activitys。

2018年9月19 经过一周,建立vue-next repo

2018年9月21日 选部启动计划


2018.09-2019早期 experiments(class,TypeScript,hooks,time slicing)

2019.01.04 Established the RFC process

2019.02.27 Class API RFC

2019.03-2019.05 researching new rendering strategy

2019.05.21 Class API dropped

2019.05-2019.06 Re-writing core rendering logic(patch flag & block tree optimizations)

2019.06-2019-06 Composition API design / feedback

2019.08.16 Compostion API RFC

2019.09 2.x Options API support . New Compiler implementation

2019.10 v-model

2019.11 Transition system

2019 12 Tooling(SFC,HMR)

2020.01.02 3.0.0-alpha.1

2020.01-2020.04 Server-side rendering

2020.4.16 3.0.0-bata.1

2020.04-2020.07 Dogfooding via vite& vitePress Teams working on V3 support in sub projects


2020.07.17 3.0.0-rc.1


what's New In Vue 3

More maintainable

typeScript + modularized internals

Faster

Poxy-based Reactivity System

Compiler-informed Virtual Dom & SSR

Smaller

Tree-shaking

Compile-time flags

Scales better

Composition API

Better DX

New Single-file Component improvements


Unlocking Advanced Use Cases

Compile-time customizations via compiler plugins (E.g. build time i18n)

Custom renderres (E.g. Native,WebGL,Terminals)

Standalone reactivity package (E.g with alternative templating system)


TypeScript

Internal

Better IDE support -> easier & safer refactoring

Actually lowers contribution barrier

External

Increasing demand for better Type Script integration from Vue users

Auto generating type declarations

more consistency,less maintenance,better DX


Composition API

Purely additive for advanced use cases

Natural,complete TypeScript support

Designed for logic organization,encapsulation and reuse

Recommended replacement for mixins


Compiler-infomed Virtual Dom

Template compilation phase provides inforamtion that can be used for runtime optimzations

Compiles templates into optimized Virtual DOM render functions

Runtime diff algorithm detects compiler-geneated hints and take fast paths whenever possible

Falls back to full diff mode on manually written,un-optimized render functions


omiler-informed SSR

Pre-optimizes static content into plain strings

Handles mix of template or VDOM based components

Efficient hydaration on the client


Tree-shaking-aware global API

pay for what you use

All features inclued:~23kb

Minimal hello world:~14kb*

Compostion API only: ~12kb*


New Single File Component Features

<script setup>

syntax sugar for Composition API in SFCs

<style vars>

state-driven CSS variables injection into SFC <style> blocks


<Suspense>

Declaratively wait on nested async dependencies

Still experimental,but you've already witnessed it in action in the Nuxt 3 demo!


支持的组件

ant design view / vent UI

建议2020年末/2021年初才投入生产。

https://composition-api.vuejs.org/zh/

0条评论