interface ContextBox { value: number; } /** * A context provider that allows multiple executions of ReactDOM.render to have separate unique id * generating counters. This is primarily useful when doing server-side rendering, as it prevents the * same counter from being reused (and further incremented) on successive page generations */ export declare const StableUniqueIdContext: import("react").Context; /** * Returns a string with the given prefix followed by a unique value not used in any other * id generated by this function. Suitable for use as an autogenerated DOM id. */ export declare const getUniqueId: (prefix: string) => string; /** * A react hook for getting a random auto-generated id and keeping it consistent across re-renders. * If the explicitId parameter is used, that is the id that is returned instead of computing a random * one. That parameter is for support of the common pattern where an auto-generated id is only * desired if the user of a component didn't specify an explicit one. * * There might sometimes be cases where you only need the id conditionally - for instance if it is on an element * that appears conditionally. Since react hook calls themselves should never be conditional, what you can do * instead is conditionally pass a dummy value as the explicitId. For instance, * if the result of this hook will go unused, you can pass the empty string as the explicitId to avoid the * computation expense of a random id. */ export declare function useUniqueId(prefix: string, explicitId?: string | null): string; export {}; //# sourceMappingURL=idUtil.d.ts.map