@wordpress/core-data
Version:
Access to and manipulation of core WordPress entities.
12 lines (11 loc) • 344 B
JavaScript
// 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