Search code examples
reactjskotlinkotlin-js-interopkotlin-frontend

What's difference between RBuilder and RDomBuilder?


In the kotlin react demo projects i see both

fun RBuilder.someComponent(){...}

and

fun RDOMBuilder<*>.someComponent(){...}

What is the difference between these two?


Solution

  • RDOMBuilder is part of the kotlin-react-dom wrapper, whereas RBuilder is part of the kotlin-react wrapper. Depending on what library you want to use, the one or the other Builder may be used.