UNPKG

@instructure/ui-react-utils

Version:

A React utility library made by Instructure Inc.

17 lines 843 B
import { ComponentClass } from 'react'; type WithDeterministicIdProps = { deterministicId?: (instanceName?: string) => string; }; /** * This decorator is used to enable the decorated class to use the `DeterministicIdContext` which is needed * for deterministic id generation. * * The context is there for the users to pass an `instanceCounterMap` Map which is then used * in the child components to deterministically create ids for them based on the `instanceCounterMap`. * Read more about it here: [SSR guide](https://instructure.design/#server-side-rendering) */ declare const withDeterministicId: (...args: unknown[]) => (ComposedComponent: ComponentClass<any>) => any; export default withDeterministicId; export { withDeterministicId }; export type { WithDeterministicIdProps }; //# sourceMappingURL=withDeterministicId.d.ts.map