Programmatically adding React components via createRoot + render gives "Invalid Hook Call" error
This really sucks. I want to be able to programmatically mount React components from my content script when I feel like it, but if I try to use
Here is my
Then when I try to use the following component (
I get this error:
Anyone know how to get around this?
createRoot and render from react-dom then I just get an Invalid hook call error.Here is my
plasmo-inline.ts content script that I was using from the with-content-scripts-ui example:Then when I try to use the following component (
TestComponent.tsx):I get this error:
Anyone know how to get around this?