Examples built with the new Vue 3 function-based component API

vue-3-function-based-examples

Examples built with the new Vue 3 function-based component API

Getting Started

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.

Prerequisites

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

Install the function-based API

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>

Use the plugin

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! πŸš€

Clone this repository

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.

Built with ❀️ using:

  • 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

Useful links

Contributing

Pull Requests for adding features ⇄ and β˜… are welcome 😎

Download Details:

Author: dj0nny

Source Code: https://github.com/dj0nny/vue-3-function-based-api

#vuejs #vue #javascript

Examples built with the new Vue 3 function-based component API
3.50 GEEK