state-synchronizers
Version:
Deterministically update state based on other state
14 lines (13 loc) • 622 B
JavaScript
;
exports.__esModule = true;
exports.createComposableStateSynchronizer = void 0;
var create_state_synchronizer_1 = require("./create-state-synchronizer");
/**
* @param stateKey The name of a piece of state that the synchronizer updates
* @param dependenciesKeys Names of pieces of state that the synchronizer depends on
*/
exports.createComposableStateSynchronizer = function (updater, stateKey, dependenciesKeys) { return ({
stateKey: stateKey,
dependenciesKeys: dependenciesKeys,
synchronizer: create_state_synchronizer_1.createStateSynchronizer(updater, dependenciesKeys)
}); };