@zedux/react
Version:
A Molecular State Engine for React
13 lines (12 loc) • 568 B
TypeScript
import { AtomSelectorOrConfig } from '@zedux/atoms';
/**
* Get the result of running an AtomSelector in the current ecosystem.
*
* If the exact selector function (or object if it's an AtomSelectorConfig
* object) reference + params combo has been used in this ecosystem before,
* return the cached result.
*
* Register a dynamic graph dependency between this React component (as a new
* external node) and the AtomSelector.
*/
export declare const useAtomSelector: <T, Args extends any[]>(selectorOrConfig: AtomSelectorOrConfig<T, Args>, ...args: Args) => T;