Hello, Has anyone ever encountered an issue on Was...
# multiplatform
t
Hello, Has anyone ever encountered an issue on Wasm and Js targets, where a string resource would not load in time to be displayed ? Resulting in a blank text field. I already had this issue in the past where i had to access the string resource once before i can work with it as a workaround (for a NavSuiteScaffold). Now i'm facing the same issue again when trying to display an alert dialog that references a string resource. Edit: i found this workaround this time. But having to do something like this is a bit unconvenient...
Copy code
val noListString = stringResource(Res.string.build_list_none) // Because reused later
var selectedListName by rememberSaveable { mutableStateOf(currentList ?: noListString) }

if (getPlatform().name in listOf("WasmJs", "Js")) {
    LaunchedEffect(noListString) {
        if (selectedListName.isBlank()) {
            selectedListName = noListString
        }
    }
}