Closed MAWoodMain closed 2 years ago
Web Component support in React is only available behind an experimental flag. Besides that, it could also be the way you bundle or transpile your code.
Closing this as this is not an issue in esp-web-tools.
Right, so you state matter of factlly that this can be done - but offer no guidance. So, i am asking for guidance. I have a react project and i would like to use this package - how do i do so? What steps are involved beyond adding the package?
Visit a React forum for guidance on React projects.
Not really an issue, more of a question, does anyone know how to import and use this module as a react component. I installed the NPM package and imported the module in my App.js using
import 'esp-web-tools'
Then added to my Apps render JSX `<esp-web-install-button manifest="/esp/manifest.json"
This does appear to create the install button and when you click it you do get a webusb com port selection window but after selecting a port I get the following errors in the browser console:
I found I can use the module if I statically import it in the index.html file and remove the NPM package entirely but this is not really how react modules are meant to be used.