If you have any project questions, concerns, or contribution ideas, join our #pwa Slack channel. Find out how to create an account by visiting Community Resources

ContainerChild

The ContainerChild component is the only child allowed within a Container in Magento PWA storefront. This component is responsible for rendering content.

Props

Name Required Description
id check_box A unique string identifier
render check_box A render prop that should return the children to render

Example

import { ContainerChild } from '@magento/peregrine';

<div data-mid="some.container.identifier">
    <ContainerChild
        id="another.unique.id"
        render={() => <div>Used just like a normal render() method</div>}
    />
    <ContainerChild
        id="one.more.unique.id"
        render={() => (
            <div>Can render anything a normal component can render</div>
        )}
    />
</div>;