Gjallarhorn


AsyncMutable<'a>

Namespace: Gjallarhorn

Type which manages state internally using a mailbox

Constructors

ConstructorDescription
new(initialState)
Signature: initialState:'a -> AsyncMutable<'a>

CompiledName: .ctor

Instance members

Instance memberDescription
Get()
Signature: unit -> 'a

Get the current state synchronously

GetAsync()
Signature: unit -> Async<'a>

Get the current state asynchronously

Set(model)
Signature: model:'a -> 'a

Set the state to a new value synchronously

SetAsync(model)
Signature: model:'a -> Async<'a>

Set the state to a new value asynchronously

Update(fn)
Signature: (fn:('a -> 'a)) -> 'a

Perform an update on the current state

UpdateAsync(fn)
Signature: (fn:('a -> 'a)) -> Async<'a>

Perform an update on the current state asynchronously

Fork me on GitHub