I have a third party webpack bundle that injects html inside <app><app/>
This is the React implementation
import "./bundle.js";
function Appp() {
return <app />;
}
How do I achieve this on NextJS using Client Side rendering. These are the things I have tried
//component
import './editors/scripts/paperbits'
const Editor =()=>{
return(
<app/>
)
}
export default Editor
//index.js
const Editor = dynamic(() =>
import('../editor'),
{ ssr: false }
)
export default function Home() {
return (
<div><Editor/></div>
)
}
In this the script is loading but its not injecting the html
The only thing that works was adding the script and tag to _document.js