lazyPlugin
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> lazyPlugin(crossinline builder: LazyPluginBuilder<S, I, A>.() -> Unit): LazyPlugin<S, I, A>
Build a new StorePlugin using StorePluginBuilder lazily. Plugin will be created upon first usage (i.e. installation). Example:
val plugin = lazyPlugin<State, Intent, Action> {
config.logger.info { "I am using config" }
onIntent { intent -> // this: PipelineContext
}
}
Content copied to clipboard