I have this mutable state with delegation ```var e...
# compose
l
I have this mutable state with delegation
Copy code
var engineName by rememberSaveable { mutableStateOf("") }
but sometimes, and initially, I want it to be null, how should I declare it ?
a
Copy code
var engineName by rememberSaveable { mutableStateOf<String?>(null) }
🙏 1
👍 1
l
Thank you very much 🙂
l
I think the following would also work:
Copy code
var engineName: String? by rememberSaveable { mutableStateOf(null) }
👍 1
🙏 1
l
Thank you : seems much cleaner 🙂