ES6 Parameter Object Destructuring with Required Values

Elijah Manor
InstructorElijah Manor

Share this video with your friends

Send Tweet

Not only can you provide default values when using ES6 parameter object destructuring, but you can also require the presence of certain properties

Denis Stoyanov
Denis Stoyanov
~ 5 years ago

I think you should provide this article http://www.2ality.com/2016/05/six-nifty-es6-tricks.html (Probably this is source where you got this approach)

Slo Cha
Slo Cha
~ 4 years ago

dude. that was smooth. i like this trick.

Mike
Mike
~ 4 years ago

Awesome! Very clever.