Hi friends!
I'm new to WASM and want to learn about its interoperability with Javascript
For example, I want to port Vercel Analytics React library to Kotlin JS/WASM and I'm going to be using it in the #C06UAH52PA7 framework that supports writing common code for both JS and WASM. I'm sure the library will work for JS, but I'm not sure how WASM works at this moment.
So any resources/guidance will be highly appreciated 🌟
Ah, understood. That's unfortunate for large projects :( but I'll at least be able to get it to work on my single page web app.
Thanks Robert 🙌
r
Robert Jaros
12/15/2024, 7:39 AM
Still I'm not sure how it is supposed to work. There is no routing support for plain React apps as well. Only JS frameworks with SSR (next, astro etc.) are fully supported so perhaps this is also a server side library? Nevertheless, to stay on-topic, in general you can do exactly the same things with Kotlin/WasmJs as with Kotlin/JS. You can write almost the same js imports and external functions and use them the same way. And with Kilua you can do all this in common code.
s
Shubham Singh
12/15/2024, 7:41 AM
Right.. that's one of the awesome things about Kilua 🌟
Not sure how that would translate if I just wanted to write a library
Maybe this question is more suitable to be asked in the #C06UAH52PA7 channel