I’m attempting to integrate Estimote Mirror functionality into a React application, but cannot build a production version of the application due to not having access to the mirror and Mirror JavaScript globals. Are there any officially supported fixes for this situation?
I’m not an React expert, but there should be a way for JS framework to access global/browser objects, because you may want to integrate your webpage with some browser APIs (WebBluetooth, MIDI, USB etc.) or other external libs. You need to check React documentation on this.
Have you tried to add this at the top of .js file?
/*global mirror*/
/*global Mirror*/
There is other way described here:
This may work since you can refer to mirror object as window.mirror.