Add convenience constructor ReactiveValue.withDuration.