-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MVICore multiplatform #114
base: master
Are you sure you want to change the base?
Conversation
id 'org.jetbrains.kotlin.multiplatform' | ||
} | ||
|
||
kotlin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about iosX64
and iosArm64
targest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always add more, probably there's also watchos or such?
mvicore-common/src/commonMain/kotlin/com/badoo/mvicore/common/base.kt
Outdated
Show resolved
Hide resolved
mvicore-common/src/commonMain/kotlin/com/badoo/mvicore/common/binder/Binder.kt
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,43 @@ | |||
package com.badoo.mvicore.common | |||
|
|||
interface Sink<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please enable the Kotlin | Style issues | Type parameter can have 'in' or 'out' variance
check, set to Weak Wraning
.
The T
parameter can be in
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please check all other places. Having in
and out
properly specified is very important.
mvicore-common/src/commonTest/kotlin/com/badoo/mvicore/common/feature/actorReducerFeature.kt
Show resolved
Hide resolved
import com.badoo.mvicore.common.Source | ||
|
||
interface Connector<Out, In> { | ||
operator fun invoke(source: Source<out Out>): Source<In> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Source
should have out
specified. Not here.
|
||
import com.badoo.mvicore.common.Source | ||
|
||
interface Connector<Out, In> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here <out Out, in In>
operator fun invoke(): Source<Action> | ||
} | ||
|
||
interface Actor<State, Action, Effect> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious how coroutines and Reactive interop will look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can check rx interop, I am pretty sure reaktive will be close
} | ||
|
||
companion object { | ||
fun manual() = ManualLifecycle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have public ManualLifecycle
class that can be instantiated directly. Do we want this duplication?
Multiplatform / framework implementation of MVICore.
Consists of several steps:
✅
Source
/Sink
/Cancellable
types✅
Binder
✅
BaseFeature
/ActorReducerFeature
/ReducerFeature
⬜️
Middleware