Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 391 Bytes

readme.md

File metadata and controls

21 lines (15 loc) · 391 Bytes

useTaxonomy

The useTaxonomy hook is a simple utility that returns the taxonomy object for any given taxonomy.

Usage

import { useTaxonomy } from '@10up/block-components';

function BlockEdit(props) {
    const [postTag, hasResolvedPostTag] = useTaxonomy('post_tag');

    if ( ! hasResolvedPostTag ) {
        return <Spinner />
    }

    return (
        ...
    );
}