mobx-view-model
Version:
MobX ViewModel power for ReactJS
16 lines • 462 B
TypeScript
import { AnyObject } from 'yummies/utils/types';
type UseValueHook = <TValue extends AnyObject>(getValue: () => TValue) => TValue;
/**
* This hook accept `getValue` function and returns it result.
*
* `getValue` _should_ executes **ONLY ONCE**.
* But in HMR it can executes more than 1 time
*
* @example
* ```
* const num = useValue(() => 1); // 1
* ```
*/
export declare const useValue: UseValueHook;
export {};
//# sourceMappingURL=use-value.d.ts.map