PHP + ReactDom.render() not loading component contents

I’m trying to load a react component to my PHP file (.pthml).

It add the component tag but the component contents are not rendered.

ReactDom.render(
    React.createElement('ProductFiltersComponent', {}),
    document.getElementById('sub-header')
);

This is how it’s added to the php file.

enter image description here

This is the component’s contents,

enter image description here

How should the react component be loaded?