SimpleComplex
SimpleComplex
PD🧩 Plasmo Developers
Created by SimpleComplex on 3/27/2024 in #🔰newbie
How do I forward an API request from inside a React component to the BGSW?
Hey all! I'm making an extension that currently has a single content script which loads up a small div using React into the DOM, where a user can enter and submit messages. These messages are sent to an external API, but as I've learned, you need to use the PlasmoMessaging API in order to proxy the request to the BGSW... My only question is, how exactly is that communication done? Can inner-components (.tsx files) easily utilize the chrome / Plasmo API, or do I need to use the base content script (the one that holds & renders my main React component) to utilize these things?
5 replies