Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 493 Bytes

File metadata and controls

17 lines (12 loc) · 493 Bytes

useSelectedTermIds

The useSelectedTermIds hook retrieves ids of the selected terms of the provided taxonomy. It gets used internally by the useSelectedTerms hook which is a more full featured version of this hook.

Usage

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

function BlockEdit(props) {
    const [selectedCategoryIds, hasResolvedSelectedCategoryIds] = useSelectedTermIds('category');

    return (
        ...
    );
}