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 state the updates written before this one produce
(setValue(prev => next)), so it is safe to call from a stale closure. It runs at the call
while no update is queued, and otherwise in the render that applies it.
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.