How to better handle `from`'s possible `undefined` state?
I'm using
Further in my code I am using the value, for instance on a
The problem here is that
Did I choose the wrong pattern nere? Do I need to further wrap the volume accessor in a memo to guarantee an initial value?
Shouldn't it be possible to set the initial value as such?
from to observe a value from an external source. Because that's an observed value, it will be undefined at start.Further in my code I am using the value, for instance on a
<Match>:The problem here is that
volume() is possibly undefined, which makes TypeScript mad because comparing undefined with number is a sin.Did I choose the wrong pattern nere? Do I need to further wrap the volume accessor in a memo to guarantee an initial value?
Shouldn't it be possible to set the initial value as such?
