I am creating a React-based browser extension and I am trying to inject a React component into webpages using content scripts. However, it seems like using React or ReactDOM prevents the content script from loading. Is there any to get around this issue? This is the code that I currently have. It seems like the content script only loads when React and ReactDOM is not used since nothing is logged to the console. import NavBar from "./NavBar"; import React from 'react'; import ReactDOM from 'react-dom'; console.log('Content script is running'); const container = document.createElement('div'); document.body.appendChild(container); ReactDOM.render(<NavBar />, container); Via Active questions tagged javascript - Stack Overflow https://ift.tt/yZtDo8N
A site where you can share knowledge