plugin
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> plugin(builder: StorePluginBuilder<S, I, A>.() -> Unit): StorePlugin<S, I, A>
Build a new StorePlugin using StorePluginBuilder. See StoreBuilder.install to install the plugin automatically.
Example:
val plugin = plugin<State, Intent, Action> {
onIntent { intent -> // this: PipelineContext
// Handle
}
}
Content copied to clipboard