This repository hosts a number of Kotlin wrappers for popular JavaScript libraries.
To learn more please refer to the API reference.
Artifacts are published to Maven Central, see the corresponding README files for package coordinates.
All packages require JDK 8 to be installed.
Use Kotlin Wrappers' version catalog.
Just declare kotlin-wrappers-catalog
in root settings.gradle.kts
and specify the modules you need:
// root `settings.gradle.kts`
dependencyResolutionManagement {
repositories {
mavenCentral()
}
versionCatalogs {
create("libs") {
val wrappersVersion = "0.0.1-pre.798"
from("org.jetbrains.kotlin-wrappers:kotlin-wrappers-catalog:$wrappersVersion")
}
}
}
// build.gradle.kts
dependencies {
jsMainImplementation(libs.wrappers.emotion)
jsMainImplementation(libs.wrappers.react)
jsMainImplementation(libs.wrappers.react.dom)
jsMainImplementation(libs.wrappers.tanstack.react.table)
// other wrappers
}
Make sure that you have mavenCentral()
in the list of repositories.
-
A port of "Thinking in React" example
-
An example of using axios to fetch remote data. It also demonstrates how to add typings for an external library.
-
An example of using Quill that shows how to use an external React component.
-
An example of using react-router-dom that shows how to use react-route-dom with hooks API.
-
Building Web Applications with React and Kotlin/JS, a tutorial by JetBrains.
-
A full-stack demo application written in Kotlin for JetBrains Night Moscow 2019.
-
An example of using react-table that shows how to use react-table with hooks API.
-
ByteLegend: an open-source, real-world HTML5 MMORPG game.
Follow these examples to learn how to start developing your React apps with Kotlin. Good luck and have fun!
Contributions to this project are welcome! Please see the open issues or chat with us on the #react channel in our Slack.