https://kotlinlang.org logo
#javascript
Title
# javascript
c

Chrys

10/27/2023, 8:35 AM
Any clue how to fix Unresolved reference: RComponent?
I have the react & react dom wrappers for bom version 1.0.0-pre.623
a

Artem Kobzar

10/27/2023, 8:49 AM
@turansky ^^
c

Chrys

10/27/2023, 8:53 AM
Copy code
implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.623"))
implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
t

turansky

10/27/2023, 8:53 AM
RComponent
- legacy API You can add
org.jetbrains.kotlin-wrappers:kotlin-react-legacy
for start
After that you can migrate on function components and remove dependency
c

Chrys

10/27/2023, 8:58 AM
Thank you very much
all is well
e

Edoardo Luppi

10/27/2023, 12:59 PM
@Chrys also don't use
enforcedPlatform
, use
project.dependencies.platform
Example using version catalog:
Copy code
api(project.dependencies.platform(libs.kotlin.wrappers.get()))
api(libs.wrapper.kotlin.js)
api(libs.wrapper.kotlin.node)
💡 1