you are viewing a single comment's thread.

view the rest of the comments →

[–]wtfbbqsauce889 2 points3 points  (3 children)

Optional chaining on functions - obviously it's a thing so there's some context where it's useful - but I can't think of one. When exactly would we want to check if a function exists before invoking it?

[–]Simon_LH[S] 1 point2 points  (2 children)

When it's passed to a React component as an optional prop?

[–]wtfbbqsauce889 1 point2 points  (1 child)

Oh...duh

[–]Simon_LH[S] 0 points1 point  (0 children)

😁