Vanilla 场景下,所有的 API 请从 /vanilla 导入,否则将因「依赖了 React 但是没有安装」问题而报错。
创建一个 Store,不包含 Hooks 属性,适用于 Vanilla JS 应用,内置了 withSubscribe 和 withSnapshot 增强器。
在 v0.2.0 版本之前,Vanilla 部分的 createVanilla 被称为 create,为了防止与 React 部分的 create 混淆,从 v0.2.0 起其改名为 createVanilla。
与 create 中的 store.mutate 相同。
与 create 中的 store.snapshot 相同,由 withSnapshot 提供支持。
与 create 中的 store.subscribe 相同,由 withSubscribe 提供支持。
与 create 中的 store.restore 相同。