How would one handle this in a common wasm module?...
# compose-web
n
How would one handle this in a common wasm module?
Copy code
@OptIn(ExperimentalJsExport::class)
    @JsExport
    // FIXME
    fun fetchCountriesJs() : List<Country> {
        return fetchCountries()
    }

    suspend fun fetchCountries() : List<Country> {
        val countries: List<Country>? = store.get()
        if (countries.isNullOrEmpty()) return api.fetchCountries().also { store.set(it) }
        return countries
    }
a
not sure what you are asking but it seems like a question for kotlin/js #javascript
👀 1