iex02/25/2020, 4:08 PM
, but curious why
doesn't. I thought it will get the current value at the point of time I activate the subject.
Zach Klippenstein (he/him) [MOD]02/25/2020, 4:32 PM
works is because
will resubscribe every time the upstream observable emits. And since
, it will only compute the value on subscription. So with
, every time you click, you’re re-subscribing to
, which re-reads the preference, and you get your new value. With
is only subscribed to once, and since it’s a
it will only emit once.
iex02/25/2020, 4:53 PM