@banez/vue-array-store
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Simple Vue 3 array store

Vuex is very complicated to setup with TypeScript and required a lot of coding for simple stuff. Because of this I've created a simple array store which uses ref API from Vue 3.

Getting started

There is only 1 entry point for this package and it is called createArrayStore as shown in example bellow:

import type { StoreItem } from '@banez/vue-array-store';

interface Todo extends StoreItem {
  task: string;
}

const store = createArrayStore<Todo>();

store.set({
  id: '1',
  task: 'Hello world!',
});

console.log(store.items());

Example

You will be able to find an example on how to use this package with Vue App by cloning the GitHub repository or by exploring the code on the GitHub repository itself.

Readme

Keywords

Package Sidebar

Install

npm i @banez/vue-array-store

Weekly Downloads

121

Version

1.2.0

License

MIT

Unpacked Size

7.77 kB

Total Files

11

Last publish

Collaborators

  • banez