Use subscribing events
The following React example subscribes to the EntitySaved event. When the event occurs, the Content Hub code dispatches this event globally and displays entity property information, the data passed on the config, and styling with a color from the material UI theme.
Tip
You can see a walkthrough of this example in the Sitecore Content Hub - External Components video available on the Discover Sitecore channel.
In this example, the return statement generates three HTML elements. The first is a heading stating a specific value, styled according to the theme.
The second element is a paragraph describing a valued passed by the JSON config object.
The third element is a paragraph containing plain text, styled using a CSS variable.