Skip to content

Latest commit

 

History

History

use-selected-terms

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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