External page components in Content Hub v4.2

 

Content Hub Dev Logo

As you might have noticed or read in the blog of Rob Habraken, the external page components have drastically changed. In the past, we had the option to either use Vue or Handlebars to build our components. Sitecore has heard our complaints in the past, that it was rather annoying to maintain the external page components because when you use the same component on different pages, you need to duplicate the Javascript code and HTML. This is a maintenance nightmare, as you need to remember where these components are used and make sure to update them. 

With the Content Hub v4.2 Sitecore also released a new and improved external page component. You can now use a React bundle in your Content Hub instance and reference the bundle in an external page component. Making it a whole lot easier to reuse the component on other pages, without the need to copy over the code. You can either host the bundle within Content Hub or use external storage like a public CDN for example.

The biggest downside of the new React components is the lack of the Mediator object we had with working with the previous version. This made it possible to interact with things like page events, send notifications and much more. With React, Sitecore eliminated that possibility, leaving us partners not able to upgrade our existing page components to React.

To resolve this impedance, I've requested to make the mediator object once available to us. It has been requested under reference MONE-34099. Sitecore is also going to update the existing documentation to not include the Vue and Handlebars examples. As will confuse people who are reading the documentation.

At the moment I'm looking into using the JavaScript SDK to see if I can get most of the functionality back.

Hopefully, we get the mediator back and still build cool features for the Content Hub pages.

Hope to give you better news within the short future.