computedPrevious
computedPrevious
is a helper function that returns a signal
that emits the previous value of the passed signal
. It’s useful when you want to keep track of the previous value of a signal.
It will emit null
as the previous value when the signal is first created.
Usage
computedPrevious
accepts a Signal
and returns a Signal
that emits the previous value of the passed Signal
.