https://kotlinlang.org logo
p

Paul Meshkovsky

02/22/2023, 12:29 AM
Is it possible to create Kotlin Singleton
Copy code
object SomeGlobalState {
    val httpClient = //init HttpClient
}
to reuse it globally in Single Page App or should this be stored in GlobalContext of react ?
t

turansky

02/22/2023, 12:37 AM
Both variants will work
p

Paul Meshkovsky

02/22/2023, 12:37 AM
Great Thank you
t

turansky

02/22/2023, 12:42 AM
useConstant can be helpfull if you will use solution with
Context
, which is more clear from my side
👀 1
It will be released in next wrappers version
🙌 1
Released
🎉 1
6 Views