has anybody tried using this from Kotlin? <https:/...
# javascript
a
has anybody tried using this from Kotlin? https://www.npmjs.com/package/react-window-infinite-loader in the example the following code is used:
{({ onItemsRendered, ref }) => (
is there a way to express that in Kotlin JS?
1
I think what it's saying is that there's a function which takes an Object with keys "onItemsRendered" and "ref", and this function is somehow passed to the parent InfiniteLoader. in Kotlin, how would be pass that function to the parent InfiniteLoader, is there some attribute that would be set?
t
You can use “options” to solve this problem
Copy code
external interface ChildrenOptions {
    onItemsRendered: Function<*>
    ref: RRef
}

// ...
children: (options: ChildrenOptions) -> ???
a
oh interesting, I see there is
fun <T> RBuilder.children(value: T)
on RComponent, is that it or is there some other "children"?
or would "children" be declared as an attribute of the InfiniteLoader wrapper?
t
Props.children
declared here without strict typization
❤️ 1
a
oh I see, that's great, thanks for your help!
t
In future we will have less
Any
,
dynamic
props in wrappers. 🙂 In common case
Any
&
dynamic
=
TODO
children
can be strict