@kwiz/fluentui
Version:
KWIZ common controls for FluentUI
11 lines (10 loc) • 479 B
TypeScript
/** track an input control if it was changed from a managed to unmanaged (controlled / uncontrolled) state between renders.
for example, if you pass a value on first render, but a defaultValue on a following render. */
export declare function useControlledStateTracker<ValueType>(props: {
name: string;
value?: ValueType;
defaultValue?: ValueType;
}): {
valueToUse: ValueType;
setValue: import("react").Dispatch<import("react").SetStateAction<ValueType>>;
};