Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
58 views

So I'm working on a Kotlin Multiplatform project and ran into this weird limitation - you can't use @JsExport in commonMain, only in jsMain. This seems really counterintuitive since the whole point of ...
user7858768's user avatar
  • 1,086
0 votes
1 answer
38 views

I'm trying to set a string resource to the document title (browser tab title). I've tried wrapping the call in a coroutine and LaunchEffect but neither works. @OptIn(ExperimentalComposeUiApi::class) ...
Some Noob Student's user avatar
0 votes
1 answer
57 views

I'm currently working on a Kotlin multi-platform project also targeting NodeJs. Building and executing tests of the project with Gradle so far worked well and without problems. Lately I tried to use ...
LazyLeguan's user avatar
0 votes
0 answers
292 views

I have a proyect with compose multiplatform using sqldelight to manage the data base, Ios and Android are working fine but the JS web, execute fine but the database isn't init with the configured ...
Deybeer Gonzalez's user avatar
1 vote
1 answer
724 views

I have object which created by suspend function like: suspend fun someSuspendFunction(): MyPreciousObject And I need to provide it for later injection using koin, like: val myModule = module { ...
Barmaley's user avatar
  • 16.4k
2 votes
0 answers
470 views

`I am working on a Kotlin Multiplatform project and trying to integrate MOKO Resources. I followed the installation instructions according to the official documentation, but I'm encountering an "...
Riccardo Queiros Casu's user avatar
1 vote
0 answers
978 views

I am trying to include the following dependency (org.jetbrains.compose.html:html-core:1.6.11) into my build.gradle.kts file under composeMain so i can use the Video Composable to load a video on my ...
onStackOverflowListener's user avatar
1 vote
0 answers
255 views

We are developing a Kotlin Multiplatform SDK that uses Ktor as the network client to handle all network calls and authentication. This SDK is intended for use across Android, iOS, and web applications....
Raman Sharma's user avatar
0 votes
1 answer
432 views

I have a set of ui components using jetpack compose. I want to use them in an existing web project. How can i do this? Is it possible to configure a kmp project for a wasm target and make it a library ...
Murad Akhmedov's user avatar
0 votes
1 answer
198 views

I have a Kotlin Multiplatform method that takes a Map as an argument. How can I call it from JavaScript? I have seen utility functions to create a Set or List from JavaScript but cannot figure out how ...
Konstantin Tarashchanskiy's user avatar
0 votes
1 answer
69 views

How to create the equivalent compose code for an HTML anchor tag? HTML code <a href="https://www.w3schools.com">Visit W3Schools.com!</a>
Abhimanyu's user avatar
  • 15.2k
0 votes
1 answer
893 views

import io.ktor.client.request.* ... val response: HttpResponse = client.get("https://example.com/version") The code above uses ktor-client-js and the get and does asynchronous HTTP requests....
John John's user avatar
  • 4,595
1 vote
0 answers
4k views

I'm getting an error when running esbuild complaining: You can mark the path "hiom" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in ...
Jan Vladimir Mostert's user avatar
0 votes
0 answers
167 views

I’m exploring Kotlin/JS at the moment and still very new to it. Currently I’m exploring React with Kotlin/JS. I’m wondering if there are any step by step guide on how I could use and integrate ...
Archie G. Quiñones's user avatar
0 votes
1 answer
155 views

val Welcome = FC<WelcomeProps> { props -> var name by useState(props.name) div { css { width = 100.pct height = 500.px margin = 0.px padding = 0.px ...
AbbasLotfinasab's user avatar
0 votes
1 answer
250 views

While using kotlin-multiplatform/js with react-redux, after the release, old way of setting-up the Redux Store Provider is deprecated (and may work only in kotlin-react-legacy lib). It was not easy to ...
Mr. Goldberg's user avatar
5 votes
1 answer
532 views

I try to reduce my codebase by using a KMM library compiled for Jvm, Android and Javascript. The simplest code in Kotlin: @JsExport actual interface DataTransferObject { actual val _type: String ...
Vitaliy Tsirkunov's user avatar
1 vote
1 answer
801 views

I'm writing a Kotlin Multiplatform library using version 1.9.0-RC, and targeting JVM, Native, and JavaScript. I want to create a class that implements an interface from a dependency. // this interface ...
aSemy's user avatar
  • 7,547
0 votes
1 answer
210 views

I'm trying to compile a kotlin file test.kt using kotlinc-js: fun main() { println("Hello world!") val a = add(7, 22) println("Added to get $a") } fun add(x: Int, y: ...
Lime's user avatar
  • 382
1 vote
1 answer
244 views

I am trying to bundle kotlin/js artifacts through webpack, in a Kotlin/JS project. The documentation here Set up a Kotlin/JS project says that For building executable JavaScript artifacts through ...
nightlytrails's user avatar
1 vote
2 answers
288 views

I am working on a Kotlin multiplatform project. I want to support copy action with formatting. There are a plenty of page in the web implementing it in javascript. All of them are almost same and do ...
vahidreza's user avatar
  • 893
2 votes
1 answer
298 views

I am not a frontend developer and not familiar with npm, yarn and this sort of tools. However I want to render some data in a Kotlin/JS project. Particularly, I want to use font-awesome icons in my ...
vahidreza's user avatar
  • 893
3 votes
0 answers
285 views

As stated in here, it is possible to compile Kotlin/JS to different modules. However, proposed solution doesn't work. When trying to add this block of code: tasks.named<KotlinJsCompile>("...
waterstopper's user avatar
2 votes
2 answers
126 views

There is window.getSelection() in JS. What is the equivalent in Kotlin/JS? There is nothing in Kotlin Window API.
vahidreza's user avatar
  • 893
0 votes
0 answers
406 views

In Kotlin/JS, how can I get the API Key written in local.properties? There is a lot of information on how to get the API Key described in local.properties in Android, but I don't know how to get it in ...
sanao's user avatar
  • 1
0 votes
1 answer
141 views

Am trying to implement Google on-tap sign-in in a Kotlin/Js project. Is there any kotlin-wrapper like library available to use https://accounts.google.com/gsi/client in a Kotlin/Js project? Or is ...
nightlytrails's user avatar
0 votes
1 answer
263 views

I'm trying to use React components from the CKEditor package in my kotlin/js code. In javascript, I would import these like this: import { CKEditor } from '@ckeditor/ckeditor5-react'; import ...
user21521399's user avatar
2 votes
1 answer
229 views

I'm trying to add a component from an external library to my react project, but I get an error when I open the page in the browser: Error: Element type is invalid: expected a string (for built-in ...
John Doe's user avatar
1 vote
1 answer
173 views

If I download a Kotlin/JS JAR-files manually from https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.3/pom or https://mvnrepository.com/artifact/org.jetbrains....
Jarl's user avatar
  • 67
0 votes
1 answer
96 views

building alot of binding libraries for a kotlin js project. i have a ton of interfaces that look like this: external interface FullscreenControlProps { var containerId: String? var position: ...
Chris Legge's user avatar
1 vote
1 answer
632 views

I want to fetch some data when a button is pressed. I know how to do it using promises and continuations (see the sample below) but I'd like to learn how to do it using suspend functions. As an ...
Jordi's user avatar
  • 2,607
2 votes
1 answer
851 views

I'm currently working on a sample application to learn Kotlin/Js with the react library. When using the normal JSX syntax, a component can be set to be triggered when a specific URL hits using the ...
Kotlin Monk's user avatar
0 votes
1 answer
123 views

so i am trying to create a wrapper for mapbox-gl-draw in my kotlin react project. my starter wrapper looks like this @JsName("default") external fun mapboxDraw() i am trying to base it off ...
Chris Legge's user avatar
1 vote
1 answer
347 views

Consider I have a cold source of UTF-8 bytes (e. g.: reading a file on disk, or the body of an HTTP response), in a form of a Flow<Byte>. How do I convert the above source to a flow of strings? ...
Андрей Щеглов's user avatar
0 votes
1 answer
321 views

I'd like to write some of my code in Kotlin such that it can be used by both a JVM-based backend and a JS-based frontend. To do the former (with the new IR complier), the classes have to be annotated ...
Brian White's user avatar
  • 8,844
1 vote
0 answers
79 views

We have a very simple test in kotlinJs to check that a function we have in Javascript is read into kotlin and returns something: JS code: function: makeKey = (num) => { return 1000 + num } Kotlin ...
willjsporter's user avatar
1 vote
2 answers
260 views

Context: Kotlin Multiplatform JavaScript. I'm trying to use a Document.evaluate() but getting Unresolved reference: evaluate and Unresolved reference: XPathResult. import org.w3c.dom.Document import ...
vovahost's user avatar
  • 36.3k
1 vote
1 answer
276 views

Assuming I have a class like this class Foo(private val someVal: String) : RComponent<SomeProp, SomeState>(){ ... } which I instantiate like so child( Foo::class ) { attrs.bar = props....
four-eyes's user avatar
  • 12.7k
1 vote
1 answer
153 views

I am trying to generate external Declaration for a NPM package but it is giving errors But when I tried the same with dukat@next version it worked Tell me either how can I include my generated ...
AmAnVeRmA's user avatar
0 votes
1 answer
64 views

I'm developing a kotlinjs react project. plugins { kotlin("js") version "1.8.0" } and I've written this class: class Percentage(private val number: Number) : Number() { ...
raven's user avatar
  • 1,213
1 vote
1 answer
265 views

When compiling using the kotlin 1.8 sdk, for example : kotlinc-js -version One gets the following: info: kotlinc-js 1.8.0 (JRE 19.0.1) error: ========== This project currently uses the Kotlin/JS ...
Richard's user avatar
  • 193
0 votes
1 answer
320 views

I am trying to write a Kotlin function that executes a HTTP request, then gives the result back to JavaScript. Because with the IR compiler I cannot use a suspended function from JavaScript, I am ...
Renato's user avatar
  • 13.8k
1 vote
0 answers
239 views

Is it possible to create a gradle config that uses the kotlin multiplatform plugin to create a project with a kotlin js client (and ktor/jvm back end) that does required the webpack/npm/yarn ...
Richard's user avatar
  • 193
0 votes
1 answer
267 views

I should use Ktor client in Compose Web. But, It can't be called in Compose Web due to async/non-async problem. Environment is template project made by IntelliJ IDEA. First, I use this: val client=...
concerty's user avatar
1 vote
1 answer
621 views

I have a multi-project gradle build that I'm trying to build inside of docker. One of the projects is a Kotlin multiplatform project that builds to JVM and JS. Building the library is fine on my ...
Lime's user avatar
  • 382
0 votes
1 answer
247 views

In JavaScript, the destructuring of an object is something common. const foo = { a: 1 b: 2 c: 3 }; const {a, b, c } = foo; console.log(a) 1 Is something like this possigle with KotlinJS ...
four-eyes's user avatar
  • 12.7k
0 votes
0 answers
151 views

external interface SquareProps: Props { var value: String var theHandleClick: () -> Unit } val Square: FC<SquareProps> = FC<SquareProps> {props -> button { +&...
LinuxMintRocks's user avatar
1 vote
1 answer
211 views

In a Kotlin/JS project, I have added the Firebase dependency - implementation(npm("firebase", "9.14.0")) Added the external declaration file: @file:JsModule("firebase/app&...
Avijit Karmakar's user avatar
0 votes
1 answer
213 views

I am using https://github.com/JetBrains/kotlin-wrappers/tree/master/kotlin-mui which is a KotlinJS wrapper around Material UI for React. I am trying to port the following code to Kotlin: <Grid ...
Stan van der Bend's user avatar
2 votes
1 answer
656 views

I trying to export Kotlin Enum classes to JS @OptIn(ExperimentalJsExport::class) @JsExport enum class interEnum { SAMPLE } But in Angular Project, after importing as NPM module, the respective TS ...
RagAnt's user avatar
  • 1,004

1
2 3 4 5 6