Not sure if that is your last question, but if you're wondering what
WrapperAction
is, I believe I have found the answer.
It's basically a built-in subinterface of the default redux
Action
that provides a default value for the
type
field, so that you can use plain data classes as actions.
To be more precise, as far as I understood,
Store<S, A, R>
defines
A
as the input action type for
dispatch()
and the reducer, and
R
as the return type of
dispatch()
.
When using enhancers, you can basically "enhance" the store to accept a new action type instead of
A
and return a new type from
dispatch()
instead of
R
.
There is a built-in enhancer provided by the
kotlin-redux
wrapper, which makes
WrapperAction
the new return type of
dispatch
and
RAction
the new input type of
dispatch
and the reducer. Internally, it simply wraps the reducer and
dispatch
.