DEV Community

Discussion on: Container/View Pattern in React inc.hooks

rmurati profile image
Redžep Murati Author

Hello. The ? operator will check only for the existence of value(it's called optional chaining).
Ex: userData?.email will return value of email variable if it exists otherwise undefined.
Here is a good documentation on this subject:
Hope u find this useful.