Skip to content

安装

  • autostore: 核心包
  • @autostorejs/plugins: 官方插件包,包括了traceshadowasyncpro等插件
  • @autostorejs/devtools: 使用Redux DevTools调试AutoStore
  • @autostorejs/syncr: 远程同步两个AutoStore

autostore

autostore是核心包,提供了AutoStore的核心功能。

如果你是Vue等其他框架的开发者,可以直接使用autostore

该包使用new AutoStore来创建AutoStore实例。

bash
npm install  autostore
bash
yarn add autostore
bash
pnpm add autostore
bash
bun add autostore

@autostorejs/plugins

@autostorejs/plugins是官方插件包,包括了traceshadowasyncpro等插件:

  • asyncpro:提供asyncComputed高级异步计算属性,支持加载状态、执行进度、超时、倒计时、重试、可取消等特性,详见异步计算
  • shadow:影子 store,在不污染原 store 的前提下派生额外的计算视图。
  • trace:跟踪函数内部的状态操作,用于调试。
bash
npm install  @autostorejs/plugins
bash
yarn add @autostorejs/plugins
bash
pnpm add @autostorejs/plugins
bash
bun add @autostorejs/plugins

@autostorejs/devtools

@autostorejs/devtoolsAutoStore的调试工具包,基于chromeRedux DevTools Extension来调试AutoStore的状态。

bash
npm install  @autostorejs/devtools
bash
yarn add @autostorejs/devtools
bash
pnpm add @autostorejs/devtools
bash
bun add @autostorejs/devtools

@autostorejs/syncer

用来实现同步不同AutoStore的数据,支持一对一,一对多等同步。

bash
npm install  @autostorejs/syncer
bash
yarn add @autostorejs/syncer
bash
pnpm add @autostorejs/syncer
bash
bun add @autostorejs/syncer