Use Vue Composition API Right Now (WIP)

Overview

Vue Use

Use Vue Composition API Right Now.

Note: Currently only Vue.js 2.x is supported. Since Vue.js has released a beta version of 3.0, this library will support the latest version of Vue.js for the first time.

CircleCI codecov GitHub Version PRs Welcome

Docs

🇨🇳 Chinese

🇺🇸 English

WIP...

Features

  • useResize -- track window.innerWidth, window.innerHeight.
  • useLoading -- run asynchronous tasks and set loading status.
  • useForm -- manage model, events of complex form.
  • useFormElement -- create custom form components that support v-model, work with useForm.
  • useTable -- manage data, paging, sorting and filter of complex table.
  • ...

More features are coming soon...

Quick Start

Installation

npm i @fext/vue-use

Usage

Create reactive loading state for component:

<template>
  <div :class="{ 'is-loading': loading }">Content</div>
</template>

<script>
  import { useLoading } from '@fext/vue-use';

  export default {
    setup() {
      const { loading, withLoading } = useLoading();

      return {
        loading,
        withLoading
      };
    },

    created() {
      this.withLoading(() => {
        return this.fetchList();
      });
    },

    methods: {
      async fetchList() {
        // remote api
      }
    }
  };
</script>

Built With

License

MIT

Copyright (c) 2020 - present, Felix Yang

You might also like...
A Vue.js plugin to use webworkers in a simply way.

VueWorker A Vue.js plugin to use webworkers in a simply way. Changelog 1.2.1 Highlights: Fix README examples See full changelog here. Why Create and u

Easy to use Vue component for Plaid Link

vue-plaid-link A simple Vue component for easy integration with the Plaid Link drop-in module Install npm install vue-plaid-link --save Example Usage

A mock plugin for vite.use mockjs.

vite-plugin-mock English | 中文 Provide local and prod mocks for vite. A mock plugin for vite, developed based on mockjs. And support the local environm

A plugin that provides a composable API for giving elements a fixed aspect ratio.

@tailwindcss/aspect-ratio A plugin that provides a composable API for giving elements a fixed aspect ratio. Installation Install the plugin from npm:

Internationalization plugin for Vue.js - fluent-vue is Vue.js integration for Fluent.js

Internationalization plugin for Vue.js - fluent-vue is Vue.js integration for Fluent.js

The word highlighter library for Vue 2 and Vue 3.
The word highlighter library for Vue 2 and Vue 3.

The word highlighter library for Vue 2 and Vue 3.

JSX for Vue 3 -  Babel Plugin JSX for Vue 3.0
JSX for Vue 3 - Babel Plugin JSX for Vue 3.0

JSX for Vue 3 - Babel Plugin JSX for Vue 3.0

Paystack module for Vue that supports Vue 2 & 3.
Paystack module for Vue that supports Vue 2 & 3.

Vue-Paystack2 is a Paystack payment gateway integration for Vue which provides Universal support for Vue 2 & 3 Table of Contents ✨ Install ✨ Usage 📖

Releases(v0.1.1)
Owner
FE Next
Frontend Next - Next-generation front-end development technologies in action
FE Next
🛠️Vue kit of useful Vue Composition API functions

??️ Vue kit of useful Vue Composition API functions.

Salvatore Tedde 44 Jan 2, 2023
Vue composition-api composable components. i18n, validation, pagination, fetch, etc. +50 different composables

vue-composable Out-of-the-box ready to use composables ?? TreeShakable ??‍♂️ Fully Typescript ?? Vue 3 and 2 support ?? Vue Devtools support Introduct

Carlos Rodrigues 1k Jan 9, 2023
🕶 Vue Composition API for automatic fetch data when condition has been changed

vue-condition-watcher ?? Introduction Vue Composition API for automatic fetch data when condition has been changed Features ✔ Auto fetch data when con

Willy Hong 42 Dec 5, 2022
A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.

?? vue-concurrency Inspired by ember-concurrency. A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition

Martin Malinda 268 Dec 26, 2022
🍍Automatically Typed, Modular and lightweight Store for Vue using the composition api with DevTools support

??Automatically Typed, Modular and lightweight Store for Vue using the composition api with DevTools support

Eduardo San Martin Morote 9.5k Dec 30, 2022
Vue Use Utilities build on top of vue-demi & @vue/compostion-api

Vue Use Utilities Vue Use Utilities build on top of vue-demi & @vue/compostion-api. It works both for Vue 2 & 3. ✨ Features ?? Composable Utilities ??

Vue Blocks 28 Dec 12, 2022
Collection of essential Vue Composition Utilities for Vue 2 and 3

Collection of essential Vue Composition Utilities ?? Features ?? Interactive docs & demos ?? Seamless migration: Works for both Vue 3 and 2 ⚡ Fully tr

VueUse 96 Dec 23, 2022
A Vue composition function that makes infinite scroll a breeze.

vue-use-infinite-scroll Installation npm i -S vue-use-infinite-scroll Usage template <div> <span>{{ errorMessageRef }}</span> <ul> <li

Andrea Simone Costa 110 Nov 12, 2022
Collection of utility composition functions for Vue

Extensive collection of composition functions for Vue

Justin Brooks 89 Nov 26, 2022
🤲 Use Vue 3's Fragment feature in Vue 2 to return multiple root elements

?? Vue 2 fragment directive to return multiple root elements

hiroki osame 180 Dec 22, 2022