Method Invoke
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Invoke(T)
Replaces the state with next.
public void Invoke(T next)
Parameters
nextTThe new state value.
Invoke(Func<T, T>)
Computes the next state from the latest committed value (setValue(prev => next)).
Reads the current value at invocation time, so it is safe to call from a stale closure.
public void Invoke(Func<T, T> updater)
Parameters
updaterFunc<T, T>Function receiving the latest value and returning the next value. Must not be null.