Just released version v0.1.0 of <kotlin-react-func...
# react
b
Just released version v0.1.0 of kotlin-react-function; the library above. ☝️
j
It looks very nice, but I guess it doesn't cooperate (yet) with the material UI library I am using https://github.com/subroh0508/kotlin-material-ui
I would love to see official material ui support in combination with this annotation 🙂
b
I use the same library! Version
0.5.0-beta1
is working for me with IR.
j
also with withStyles?
b
No, because with this plugin you never get a
RClass
or
FunctionalComponent
to wrap with
withStyles
. However,
makeStyles/useStyles
works which is what I am using.
v
This looks cool but what to do when you want to set the key?
j
I'm gonna check out usestyles
b
I could add an RKey annotation which annotates a parameter to the function? Please file a ticket if you can share an example of what you are doing now.
@Vlad, would something like this meet your needs?
Copy code
@RFunction
fun RBuilder.ListItem(@RKey key: Long) {
  ...
}
If the
toString()
value of a parameter annotated with
@RKey
was set as the component key?