lehakorshun
05/27/2020, 2:12 PMSkeptick
06/29/2020, 5:58 AMUIViewController
. More specifically, working with Lifecycle, subscription for state changes and sending events.
If I just copy LifecycleRegistryExt
and LifecycleWrapper
and do:
override func viewDidLoad() {
self.viewLifecycle = LifecycleRegistry()
self.controller?.controller.onViewCreated(...)
self.controller?.lifecycle.start()
}
override func viewDidAppear(_ animated: Bool) {
self.viewLifecycle?.resume()
}
override func viewDidDisappear(_ animated: Bool) {
self.viewLifecycle?.destroy()
}
deinit {
self.controller?.lifecycle.stop()
}
Would this be the right approach?Skeptick
06/29/2020, 6:35 AM@Published
replaced with PublishSubject
from RxSwift. I don’t like the need to use an additional library for such a simple task. In addition, in mpp-library I use coroutines. Perhaps there is an easier way to signal the UIViewController
of a state change?aiidziis
06/30/2020, 12:45 PMmvikotlin-logging
, for now everything gets logged, storeName
, eventType
and value
, but value
sometimes gets huge (mainly because of Model
and State
data classes) and pollutes the logcat. I saw that now we can specify maxLenght
for log message, but that is more like guessing game.Skeptick
07/16/2020, 3:39 PMStateKeeperProvider
to keep Store
during configuration change. I do it as in the example:
stateKeeperProvider.retainStore (lifecycle) {...
But when I close the fragment and reopen it, I get the error “_The supplier is already register with this key: class com.example.MyStore_”. Shouldn’t the supplier unregister in such cases? And what should I do to avoid getting this error?lehakorshun
08/27/2020, 2:29 PMJimK
09/03/2020, 2:59 PMlehakorshun
09/03/2020, 4:09 PMinstanceKeeper
for reusing Store and in init I add lifecycle.doOnDestroy(citiesStore::dispose)
of cause, it doesn’t work after configuration was changed. when should I dispose my store, if I reuse instance via instanceKeeper?AG
09/06/2020, 2:56 PMUse of unresolved identifier 'DefaultStoreFactory'
let store = NotesStoreFactory(DefaultStoreFactory())
here is my build.gradle.kts file from shared module
val commonMain by getting {
dependencies {
api("com.arkivanov.mvikotlin:mvikotlin:2.0.0-rc3")
api("com.arkivanov.mvikotlin:mvikotlin-main:2.0.0-rc3")
api("com.arkivanov.mvikotlin:rx:2.0.0-rc3")
//other deps
}
}
Can someone help me to figure out what was the problem ?lehakorshun
09/20/2020, 2:39 AMJimK
09/29/2020, 3:55 PMNikita Klimenko [JB]
10/02/2020, 12:06 AMJimK
10/02/2020, 8:06 PMproject.dependencies {
composeCompiler "androidx.compose.compiler:compiler:$compose_version"
}
steelahhh
10/04/2020, 3:49 PMBootstrapper
, but SimpleBootstrapper
After configuration change this exception occurs on application launch:
java.lang.IllegalStateException: Value is already initialized: Function1<Action, kotlin.Unit>
at com.arkivanov.mvikotlin.utils.internal.AtomicExtKt.initialize(AtomicExt.kt:7)
at com.arkivanov.mvikotlin.extensions.coroutines.SuspendBootstrapper.init(SuspendBootstrapper.kt:26)
at com.arkivanov.mvikotlin.main.store.DefaultStore.<init>(DefaultStore.kt:58)
at com.arkivanov.mvikotlin.main.store.DefaultStoreFactory.create(DefaultStoreFactory.kt:21)
Although this is easily avoided by using SimpleBootstrapper
, I’m wondering is this behaviour intended or is there something that we have to do to prevent the exception from happening?
The issue can be reproduced in decompose or mvikotlin sample app by replacing the SimpleBootstrapper
by Suspend/ReaktiveBootstrapper
JimK
10/11/2020, 2:19 PMmiqbaldc
10/21/2020, 4:07 PMJon Miller
11/01/2020, 4:05 PMErmolenko Alexandr
11/09/2020, 8:13 AMEgor K.
11/29/2020, 10:28 AMtieskedh
12/05/2020, 2:42 PMTask
which the binder then connects to the real use-cases is the best way?
The output of the use-cases should then be dispatched to the reducer.
Probably using the binder too?
Intents that only need simple updates (which don't need suspending) can be dispatched by the Executor itself.
The other alternative would be to give the Use-case classes all to the executor (which is a SuspendingExecutor after all), but I think this approach is way cleaner.
The Task-class could be implemented using Label with a lambda to dispatch.
Is this the way to go, or is there a better one?Stanislav
01/16/2021, 2:23 PMEgor K.
02/02/2021, 5:21 PMShabinder Singh
02/17/2021, 10:02 PMArchie
03/02/2021, 2:53 AMNikiizvorski
03/17/2021, 4:36 PMDavide C
03/29/2021, 2:16 PMmarzelwidmer
03/31/2021, 8:55 AMShawn Tucker
04/01/2021, 6:32 PMstore
is too big to be persisted? Until today, I reflected in my state
object, which data
I should query. This is important because my data
can be too big for my savedStateHandle[android]
to restore. The problem I am facing with this approach is that sometime my state
depends on the data
and sometime the data
depends on my state
.
Any suggestions/articles that address that state != data
and can help me find a better approach that solves the issues I am facing?iamsteveholmes
04/07/2021, 5:52 PMimport Foundation
import TodoLib
class TodoListViewProxy: BaseMviView<TodoListViewModel, TodoListViewEvent>, TodoListView, ObservableObject {
@Published var model: TodoListViewModel?
override func render(model: TodoListViewModel) {
self.model = model
}
}
Where is the TodoListViewModel generated?
If I set up a preview here and there was data being accessed from the model (using sqldelight in this case), would we expect the preview to show the data?Mike
04/08/2021, 10:18 AMMike
04/08/2021, 10:18 AMsteelahhh
04/08/2021, 10:54 AMLabel
– check out the todo sample, specifically TodoAddStore
or TodoDetailsStore
Arkadii Ivanov
04/08/2021, 10:54 AMMike
04/08/2021, 11:00 PM