Migrating to React

To improve performance and add new features, Content Hub replaced the front-end Knockout framework with React. This change provides you with a better user experience and enables you to build newer custom components.

The move from Knockout to React results in differences between the old and the new version of components. Here are some of the most important differences:

  • CSS selectors have changed.

  • External components that search for an element based on a CSS selector cannot find that element.

  • CSS written for Knockout doesn't work with React. You'll need to change the CSS to React pages in the portal builder.

The Home page remains in Knockout, because it contains custom CSS and it loses custom styles when rendered in React. Similarly, there are no changes to saved searches and saved selections.

If a page only contains Knockout components or has compatibility issues in Hybrid mode, it will render in full Knockout mode only. If such a page contains React components, then these components are not used.

If a page is forced in Knockout, the older Knockout version of the component is used.

Tip

To see whether your page is rendered in React or in Knockout, open the developer tools by right-clicking in the browser window and then clicking Inspect > Console.

Do you have some feedback for us?

If you have suggestions for improving this article,