Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Latest commit

 

History

History
28 lines (18 loc) · 750 Bytes

File metadata and controls

28 lines (18 loc) · 750 Bytes

Reuse a Venia Component

Here we'll quickly demonstrated how PWA Studio components can be easily reused.

Import the CategoryList to the Foo component:

import CategoryList from '@magento/venia-ui/lib/components/CategoryList';

Next add the following JSX.

<hr className={classes.spacer} />
<p className={classes.label}>Reuse of a the PWA Studio component to render a category list:</p>
<CategoryList title="Foo Recommends" id={2} />

Check the storefront of the app to see the CategoryList component rendered.

Learn more