JS is working perfectly in HTML template when I try it on LiquidJS playground. But it is not working with ReactLiquid in react.
Following is my code, please tell me where I am doing wrong
const template = `<html lang="en">
<body>
<h1 data-id="hj">Hello</h1>
<script>
console.log('Here')
document.querySelectorAll("[data-id='hj']")[0].innerHTML = 'World';
</script>
</body>
</html>`
const RightPanel = ({data}) => {
return (
<div className={styles.container}>
<div className={styles.pdfPage}>
<ReactLiquid template={template} data={data} html />
</div>
</div>
)
}