mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-23 01:22:00 +00:00
12 lines
295 B
TypeScript
12 lines
295 B
TypeScript
import { useContext } from 'react';
|
|
import { EntityRegistryContext } from '../entityRegistryContext';
|
|
|
|
/**
|
|
* Fetch an instance of EntityRegistry from the React context.
|
|
*/
|
|
export function useEntityRegistry() {
|
|
return useContext(EntityRegistryContext);
|
|
}
|
|
|
|
export default useEntityRegistry;
|