Franco
09/08/2020, 9:42 AM@file:JsModule("react-gtm-module")
@file:Suppress("unused")
package react.gtm
external object TagManager {
fun initialize(args: TagManagerArgs)
}
but when I run it I get the error Uncaught TypeError: Cannot read property 'initialize' of undefined
. Any idea what I'm doing wrong?Franco
09/08/2020, 9:54 AM@JsModule("react-gtm-module")
@JsNonModule
external object TagManager {
fun initialize(args: TagManagerArgs)
}
It seems that I have to do it like this because of how the module is exported on the JS library. Hopefully it helps someone.