UNPKG

@wordpress/core-data

Version:
12 lines (11 loc) 344 B
// packages/core-data/src/hooks/use-entity-id.js import { useContext } from "@wordpress/element"; import { EntityContext } from "../entity-context"; function useEntityId(kind, name) { const context = useContext(EntityContext); return context?.[kind]?.[name]; } export { useEntityId as default }; //# sourceMappingURL=use-entity-id.js.map