Optional Chaining in JavaScript

Optional chaining enables capabilities for Javascript developers to perform a nil check on the objects before trying to access any object properties.

As an example:

this.props?.user?.email

Optional Chaining behaves similarly to Ruby’s pretzel(&) operator.

Checkout the official babel documentation. Babel - Optional Chaining


Thank you, your answers have been sent
These will help me create more relevant content that you’re looking for.
Always stay up to date
I do not share data to anyone

I’ll only use the information you provide on this form to get touch about the topics you’ve chosen above. I do not share this data with anyone else.