Hi, if I want to use compose resources from a KMP ...
# ios
m
Hi, if I want to use compose resources from a KMP module in iOS Do we have something that does what this function does out of the box?
Copy code
fun StringResource.localized(): String {
    return runBlocking { getString(this@localized) }
}
k
You are not supposed to use compose resources outside of the ui
m
so I cannot use Compose Resources from SwiftUI like with Moko Resources
d
I was going to suggest moko resources. LOL.
d
I'm in that hybrid scenario right now and preferring Moko for that reason - we can resolve strings in the shared 'View Mapper' layer, right before platform-divergent View-binding.
Compose Resources are great in a pure Compose situation - just a case of choosing the right tool for the job.