9.14.4-1 • Published 2 years ago

@eatalynet/reactivecore v9.14.4-1

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
2 years ago

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