DEV Community

Discussion on: 3 Weird Things You (Probably) Didn't Know You Can Do With The JavaScript Spread Operator πŸ₯³

Collapse
 
harrison_codes profile image
Harrison Reid

Absolutely - I tend to agree that while there are some cases where this pattern is useful, it’s often better to keep a consistent object schema, and explicitly set the missing properties to null.

As with all things (especially somewhat obscure patterns), use with caution!

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

It's a hobby to know strange JavaScript, I can relate.

I am also interested in the obscure, checkout my labeled loops post, it's right up there in the do not do this camp.