1. Components

WidgetsContainer

WidgetsContainer is a React component that can render all widgets, configured in Sitecore Discover Customer Engagement Console (CEC). At runtime, it renders widgets based on those configured for the URL or page.

Import path

import { WidgetsContainer } from '@sitecore-discover/react';

Example

The WidgetsContainer is added as a child to the WidgetsProvider component, as follows:

<WidgetsProvider
    env='<environment>'
    customerKey='<customer key>'
    apiKey='<api key>'
    useToken
    >
    <WidgetsContainer />
</WidgetsProvider>
If you have suggestions for improving this article, let us know!