What options are there to bundle an external javascript sdk into a React Component?
I have tried including the javascript in the index.html and referring to it through
1. If the external file is a module, I would approach it as follows:
/utils folder.import { test } from '/utils/external'2. If it's not a module:
import { test } from '/utils/external'* In both scenarios I assume it's a standalone external file, not being hosted somewhere as a package (npm / bower / etc.). If it's a package, instead of downloading it manually, you should use a package manager.
Follow the @Paras answer, where he suggests for using a library for script async lazy loading.