1.2.0 • Published 1 year ago

@banez/vue-array-store v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.