Module

Cherry.Store

Package
purescript-cherry
Repository
oreshinya/purescript-cherry

#Store Source

newtype Store e s

#createStore Source

createStore :: forall s e. s -> Store (ref :: REF | e) s

#subscribe Source

subscribe :: forall s e. Eff (ref :: REF | e) Unit -> Store (ref :: REF | e) s -> Eff (ref :: REF | e) Unit

#unsubscribe Source

unsubscribe :: forall s e. Store (ref :: REF | e) s -> Eff (ref :: REF | e) Unit

#select Source

select :: forall a s e. Store (ref :: REF | e) s -> (s -> a) -> Eff (ref :: REF | e) a

#reduce Source

reduce :: forall s e. Store (ref :: REF | e) s -> (s -> s) -> Eff (ref :: REF | e) Unit