A shared ViewModel has no lifecycle, so you have to give it one
androidx.lifecycle.ViewModel is Android's. The shared class needs an explicit clear() and two platforms that call it.
We use Google Analytics to see which pages help people. No ads, no profiles. Privacy Policy
70 posts
androidx.lifecycle.ViewModel is Android's. The shared class needs an explicit clear() and two platforms that call it.
Each collector re-runs the producer. Two UI observers plus a test is three executions.
Five targets, five sinks, and one of them discards your output silently.
The default hierarchy creates intermediate source sets you never declared.
Conflation turns two identical emissions into one, so a repeated event vanishes.
Structured concurrency propagates failure upward by design. SupervisorJob is how you declare independence.
One test, five executions. That is how you find platform bugs — and how one flaky test fails five jobs.
Instant is unambiguous. LocalDateTime is not. The same arithmetic can disagree across targets.
An interface is resolved at runtime by an instance. expect/actual is resolved at compile time by the source set.
Every public declaration in the shared module becomes Swift API. internal is the design tool.
The driver is a one-line expect/actual. Threading, file location, and the OS deleting your file are the rest of it.
Registration is common. The bindings are not. DI defers the error to first use, which is usually on a user's device.