ES6 Parameter Object Destructuring with Required Values

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
~ 8 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
~ 8 years ago

dude. that was smooth. i like this trick.

Mike
~ 8 years ago

Awesome! Very clever.