@jswork/pinia-state-tree
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

pinia-state-tree

Pinia state tree.

Alt text

version license size download

installation

npm install @jswork/pinia-state-tree

usage

import { createSSRApp, watch } from "vue";
import { createPinia } from "pinia";
import PiniaStateTree from "@jswork/pinia-state-tree";
import App from "./App.vue";

export function createApp() {
  const app = createSSRApp(App);
  const pinia = createPinia();

  pinia.use(PiniaStateTree);
  app.use(pinia);
  //...
}

features

  • [x] nx.$app: app instance
  • [x] nx.$pin: pinia instance
  • [x] nx.$get: get state by path
  • [x] nx.$set: set state by path
  • [x] nx.$state: root state tree
  • [x] nx.$store: root store tree
  • [x] nx.$query: query store by path
  • [x] nx.$call: call store action by path
  • [x] nx.$map: map computed by path list

license

Code released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/pinia-state-tree

Homepage

js.work

Weekly Downloads

7

Version

1.1.1

License

MIT

Unpacked Size

17.1 kB

Total Files

9

Last publish

Collaborators

  • afeiship