UNPKG

841 BTypeScriptView Raw
1import React from 'react';
2type WithDeterministicIdProps = {
3 deterministicId?: (instanceName?: string) => string;
4};
5/**
6 * This decorator is used to enable the decorated class to use the `DeterministicIdContext` which is needed
7 * for deterministic id generation.
8 *
9 * The context is there for the users to pass an `instanceCounterMap` Map which is then used
10 * in the child components to deterministically create ids for them based on the `instanceCounterMap`.
11 * Read more about it here: [SSR guide](https://instructure.design/#server-side-rendering)
12 */
13declare const withDeterministicId: (...args: unknown[]) => (ComposedComponent: React.ComponentClass<any, any>) => any;
14export default withDeterministicId;
15export { withDeterministicId };
16export type { WithDeterministicIdProps };
17//# sourceMappingURL=withDeterministicId.d.ts.map
\No newline at end of file