Lightning Web Component getState Method

Use the getState method to retrieve the current state of the rendered Lightning web component for CRM Analytics dashboards.

Argument NameDescription
callbackThe callback function to handle the getState response. See the next section for a basic callback example.

Add your implementation of the getState call into the wrapper Javascript and HTML for your component.

To use the communityDashboard component, replace wave-wave-dashboard-lwc with wave-community-dashboard.

The HTML for the component:

The Javascript for the component, which implements getState():

In this example, the callback function result contains a JSON payload with state attributes. Here’s a sample callback result.

See Also