How to use the @magento/peregrine/lib/talons/CategoryList/useCategoryList.useCategoryList function in @magento/peregrine

To help you get started, we’ve selected a few @magento/peregrine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jordaneisenburger / fallback-studio / src / pwa-studio / packages / venia-ui / lib / components / CategoryList / categoryList.js View on Github external
const CategoryList = props => {
    const { id, title } = props;
    const talonProps = useCategoryList({
        query: categoryListQuery,
        id
    });

    const { childCategories, error, loading } = talonProps;

    const classes = mergeClasses(defaultClasses, props.classes);

    const header = title ? (
        <div>
            <h2>
                <span>{title}</span>
            </h2>
        </div>
    ) : null;