2 fixed an issue where self wasn't declared, and instead used this. As it turns out, when running the compiled build (not in development mode via chrome), that lead to some errors where this wasn't defined.
This ensures the reference works both in development and production modes on React Native by using either this or global, depending on which one exists.
The error can be seen below
This has been verified to work in both environments, hadn't tested both in #2. Third time's a charm...
2 fixed an issue where
self
wasn't declared, and instead usedthis
. As it turns out, when running the compiled build (not in development mode via chrome), that lead to some errors wherethis
wasn't defined.This ensures the reference works both in development and production modes on React Native by using either
this
orglobal
, depending on which one exists.The error can be seen below
This has been verified to work in both environments, hadn't tested both in #2. Third time's a charm...