package Ġreact . k store . reaction Ċ Ċ import Ġreact . k store . Update able Store Ċ import Ġreact . k store . action . Dispatcher Ċ import Ġkotlin . reflect . K Class Ċ Ċ open Ġclass ĠConstructor Update able Store Reaction < STATE Ġ: ĠAny >( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġstore : ĠUpdate able Store < STATE > Ċ ) Ġ{ ĊĊĠĠĠ Ġfun Ġ< ACTION Ġ: ĠAny > Ġon ( action Class : ĠK Class < ACTION >): ĠUpdate able Store In fix Reaction Builder < ACTION , ĠSTATE > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠUpdate able Store In fix Reaction Builder ( action Class , Ġstore , Ġstore . dispatcher ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ< ACTION Ġ: ĠAny > Ġon ( action Class : ĠK Class < ACTION >, Ġfunction : ĠStore Reaction Builder < ACTION , ĠSTATE >. () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠStore Reaction Builder ( action Class , Ġstore , Ġstore . dispatcher ) ĊĠĠĠĠĠĠĠ Ġbuilder . function () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ< ACTION Ġ: ĠAny > Ġon ( dispatcher : ĠDispatcher , Ġaction Class : ĠK Class < ACTION >): ĠUpdate able Store In fix Reaction Builder < ACTION , ĠSTATE > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠUpdate able Store In fix Reaction Builder ( action Class , Ġstore , Ġdispatcher ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ< ACTION Ġ: ĠAny > Ġon ( dispatcher : ĠDispatcher , Ġaction Class : ĠK Class < ACTION >, Ġfunction : ĠStore Reaction Builder < ACTION , ĠSTATE >. () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠStore Reaction Builder ( action Class , Ġstore , Ġdispatcher ) ĊĠĠĠĠĠĠĠ Ġbuilder . function () ĊĠĠĠ Ġ} Ċ Ċ } ĊĊ