https://kotlinlang.org logo
Title
t

Tung97 Hl

05/24/2023, 12:46 PM
Hi everyone. I have a question about TimeTravelStore. I see in the documentation we should not use it in production. So that mean i should check build type to remove it in production build, or the library do it automatically (as same as the Log.d() ), or any best practice? Thank you in advance
a

Arkadii Ivanov

05/24/2023, 1:32 PM
The library doesn't do it automatically. On Android you can either check BuildConfig.DEBUG flag at runtime (see example), or better use flavors to avoid the dependency in release builds completely. Similar ways should be available on other platforms. https://github.com/arkivanov/MVIKotlin/blob/0aae7f801526126f7dd9d4da84a601cfb9f708b5/sample/reaktive/app-android/src/main/java/com/arkivanov/mvikotlin/sample/reaktive/app/Utils.kt#L15
t

Tung97 Hl

05/24/2023, 1:38 PM
Thank you for your recommendation. I love this library. :face_holding_back_tears: