Use Vue 3 Composition API In Vue 2 App

Description:

This is a Vue.js plugin which provides a simple way to use Vue.js 3 Composition API in your Vue.js 2.x apps.

How to use it:

Import the VueCompositionApi.

import Vue from 'vue';
import VueCompositionApi from '@vue/composition-api';

Register the plugin and we’re ready to go.

Vue.use(VueCompositionApi);

Preview:

Use Vue 3 Composition API In Vue 2 App

Download Details:

Author: vuejs

Live Demo: https://vue-composition-api-rfc.netlify.com/

Download Link: https://github.com/vuejs/composition-api/archive/master.zip

Official Website: https://github.com/vuejs/composition-api

Last Update: August 29, 2019

Install:

# Yarn
$ yarn add @vue/composition-api

# NPM
$ npm install @vue/composition-api --save

You Might Be Interested In:

Add Comment