Andrey Ivanov
05/18/2021, 12:05 PMexternal fun <T> import(path: String): Promise<T>
or
external fun <dynamic> import(path: String): Promise<dynamic>
I try to use like this:
val SomePage = rLazy<dynamic> {
{ import<dynamic>("./somePage.js") }
}
I get the error:
Type mismatch.
Required:
RClass<TypeVariable(P)>
Found:
() → Promise<dynamic>
Why? I don't understand by the signature, I give him a lambda and he sees a promise inside the lambda.turansky
05/18/2021, 1:35 PMreact.lazy
inside.turansky
05/18/2021, 3:48 PM