Examples built with the new Vue 3 function-based component API
As announced, in the version 3 of Vue.js (the release will probably be in the third quarter of 2019, you can see the complete roadmap here) there will be an important introduction: the function-based component API. But what exactly is it?
Introduced as an RFC for 3.x, the new API presents a clean and flexible way to compose logic between and inside components. Must be specified that for now, it is an open RFC which means it's not set in stone and can change based on users feedback.
For this project you need Node installed on your machine with Npm or Yarn.
If you want you can install the official Vue CLI. You can add it typing, inside a terminal:
npm install -g @vue/cli
# OR
yarn global add @vue/cli
You can install it, inside your Vue.js 2.x application via npm or yarn:
npm install vue-function-api
# OR
yarn add vue-function-api
Or add it via CDN if you not using the CLI:
<script src="https://unpkg.com/vue-function-api/dist/vue-function-api.umd.js"></script>
Last step: add the package to your Vue app:
import Vue from 'vue'
import { plugin } from 'vue-function-api'
Vue.use(plugin)
And we are ready! 🚀
You can clone this repository using Git:
git clone https://github.com/dj0nny/vue-3-function-based.git
Or download the repository here
Before using the apps, you need to install the dependencies. Open a terminal and type, inside the directory:
npm install
# OR
yarn install
For running them:
npm run serve
# OR
yarn serve
The Vue development server it will be up and running at this address: http://localhost:8080.
- Vue.js - A Javascript framework
- Vue Function API - provides function api from Vue3.x to Vue2.x for developing next-generation Vue applications.
- vue-hooks - Awesome hooks for Vue.js
- Function-based component API (extended discussion) - vuejs/rfcs#55
- Evan You Previews Vue.js 3.0 - https://medium.com/vue-mastery/evan-you-previews-vue-js-3-0-ab063dec3547
- Vue Project Roadmap - https://github.com/vuejs/roadmap
Pull Requests for adding features ⇄ and ★ are welcome 😎