DEV Community

Discussion on: Optional Chaining

Collapse
 
codevoyager profile image
Tomasz Puch

Looks cool and would give it a try. In day-to-day a use fp-ts. fp-ts has (besides many more) Option monad. Which handles optional values by default. I guess optional chaining handles it in a similar way.
You try to read property on a variable and if a variable is "falsy" - a variable itself is being "returned".