Hello all hope you are doing well. How do you solv...
# compose-ios
d
Hello all hope you are doing well. How do you solve this issue when using compose multiplatform. I want to access a string resource from a coroutine here is a solution for android. In my code I currently go with
Copy code
val mealOrderedSnackbarMessage =
        stringResource(MR.strings.side_effect_menu_meal_ordered_snackbar_message)

LaunchedEffect(Unit){
    // access resources through local variable - mealOrderedSnackbarMessage
}
but I don't like it honestly
k
Here is a suggestion. Why are you using these resources now? We already have composeResources ?
d
You will face the same issue with
composeResources
, still needs to be a composable
k
You are doing in a wrong way. You can't pass any composable inside the SideEffects.