@appbaseio/reactivecore

中文文档
10.4.0发布于 2025/03/04Apache-2.0ESM + CJS近 30 天下载 1.8万

Core architecture of reactive UI libraries

原始使用文档
文档目录6 节
  1. Installation
  2. Usage and documentation
  3. Create store:
  4. Supported actions:
  5. Utility methods
  6. Changelog

reactivecore

npm version

This is the platform agnostic core architecture of reactive UI libraries.

Installation

yarn add @appbaseio/reactivecore

Usage and documentation

Create store:

import configureStore from "@appbaseio/reactivecore";

Supported actions:

Import via:

import { <actionName> } from "@appbaseio/reactivecore/lib/actions"
ActionUsage
addComponentto register a component in the store
removeComponentto remove a component from the store
watchComponentto set up component subscription
setQueryto set the component query in the store
setQueryOptionsto add external query options
logQueryExecuted automatically to log query for gatekeeping
executeQueryExecuted automatically (whenever necessary, based on the dependency tree) when the query of a component is updated
updateHitsupdates results from elasticsearch query
updateQueryto update the query in the store - called when a change is triggered in the component
loadMorefor infinte loading and pagination

Utility methods

Import via:

import { <methodName> } from "@appbaseio/reactivecore/lib/utils"
MethodUsage
isEqualCompare two objects/arrays
debounceStandard debounce
getQueryOptionsreturns applied query options (supports size & from)
pushToAndClausePushes component to leaf and node. Handy for internal component registration
checkValueChangechecks and executes before/onValueChange for sensors
getAggsOrderreturns aggs order query based on sortBy prop
checkPropChangechecks for props changes that would need to update the query via callback
checkSomePropChangechecks for any prop change in the propsList and invokes the callback

Changelog

Check the Changelog doc

版本与发布记录

@appbaseio/reactivecore 共发布 292 个版本,首次发布于 2017/11/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
10.4.0latest2025/03/041.7 年前
10.4.0-alpha2025/03/031.7 年前
9.15.22024/02/142 年前
10.3.02023/12/132 年前
10.2.12023/11/013 年前
10.2.02023/10/183 年前

其他发布通道:beta → 10.2.0-alpha.4。

关于 @appbaseio/reactivecore 的常见问题

@appbaseio/reactivecore 是什么?

Core architecture of reactive UI libraries

如何安装 @appbaseio/reactivecore?

在项目目录运行 npm install @appbaseio/reactivecore,或使用 pnpm add / yarn add / bun add。

@appbaseio/reactivecore 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/appbaseio__reactivecore 是否存在。

@appbaseio/reactivecore 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@appbaseio/reactivecore 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=10.16.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@appbaseio/reactivecore 可以商用吗?

@appbaseio/reactivecore 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@appbaseio/reactivecore 的下载量有多少?

根据 npm 官方下载统计,@appbaseio/reactivecore 在 2026/10/07 – 2026/11/05 这 30 天内被下载 18,385 次,日均约 613 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@appbaseio/reactivecore 还在维护吗?

最新版本 10.4.0 发布于 2025/03/04(1.7 年前);至今共发布 292 个版本,其中过去 12 个月发布了 0 个;首次发布于 2017/11/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。