DEV Community

Discussion on: 😰 Optional chaining trap !

smeijer profile image
Stephan Meijer

I'm aware of that syntax. But defaults don't work for null values. As grapql tends to return null for missing data, I don't use that syntax that much.

In a real world scenario, I would have moved the assignment out of the arguments.

Thread Thread
wintercounter profile image
Victor Vincent

Makes sense!