/vue-function-api

Use vue v3's API with vue 2

Primary LanguageJavaScript

Vue Function-based API Implementation

Demo

Live

Source

Notice

  1. Value Unwraping is is available yet. So you have to use somethingReactive.value @click="somethingReactive.value++" in your render function (or template).
  • value/computed: not supported
  • inject: not supported
  • state: partial support (not deep nested)
  1. Functional Components are not supported yet.

Usage

Just replace every import Vue from 'vue' in your files with import Vue from 'vue-functional-api'.

Since import Vue from 'vue' also occurs in the es module bundle of this package, a webpack alias may not work.

API

Take a look at src/index.js.