@coaction/vue

A Coaction integration tool for Vue
2,657 88
Install
npm install @coaction/vue
Latest Version:4.1.0
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: unadlib

@coaction/vue

Node CI npm license

English documentation · 中文文档

A Coaction integration tool for Vue

Installation

Install it with pnpm:

pnpm add coaction @coaction/vue

Usage

import { create } from '@coaction/vue';

const useStore = create((set) => ({
  count: 0,
  increment() {
    set((draft) => {
      draft.count += 1;
    });
  }
}));

export default {
  setup() {
    const state = useStore();
    const count = useStore((current) => current.count);
    return {
      state,
      count
    };
  }
};

Use autoSelector to receive computed refs for each field:

const selectors = useStore({ autoSelector: true });
selectors.increment();
console.log(selectors.count.value);

Documentation

You can find the documentation here.

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

588,019,132 54,801
vue
@vueuse/shared
372,738,348 22,398
@vueuse/core

Collection of essential Vue Composition Utilities

367,188,523 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

333,357,380 686
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591

Version History

Version Released Vue License
4.1.0 ^3.0.0 MIT
4.0.0 ^3.0.0 MIT
3.2.1 ^3.0.0 MIT
3.2.0 ^3.0.0 MIT
3.1.0 ^3.0.0 MIT