Skip to content

Files

Latest commit

f467e1d · Jun 18, 2024

History

History

use-selected-terms

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 18, 2024
Jan 18, 2023

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 (
        ...
    );
}