abon
Version:
Flexible state management for React 🚀
13 lines (12 loc) • 620 B
TypeScript
import { Abon } from "./abon";
import { ReadonlyAbonInheritedDown } from "./readonly-abon-inherited-down";
/** Inherits a value from parents if the current value is undefined. */
export declare class AbonInheritedDown<T> extends ReadonlyAbonInheritedDown<T> implements Abon<T> {
set(value: T): this;
nest(): AbonInheritedDown<T>;
notify(): void;
set current(value: T);
get current(): T;
static use<T extends object>(initial?: () => T, deps?: readonly any[]): AbonInheritedDown<T>;
static useRef<T extends object>(initial?: () => T, deps?: readonly any[]): AbonInheritedDown<T>;
}