Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 363 Bytes

File metadata and controls

17 lines (12 loc) · 363 Bytes

useSelectedTerms

The useSelectedTerms hook retrieves the term objects of the selected terms of the provided taxonomy.

Usage

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

function BlockEdit(props) {
    const [selectedCategories, hasResolvedSelectedCategories] = useSelectedTerms('category');

    return (
        ...
    );
}