Is there a one-liner to do this that I'm blanking on?
// this.state is a basic object with many keys
var {toDate, fromDate, location, flavor} = this.state
var goodKeys = {toDate, fromDate, location, flavor}
// goodKeys is an object that contains a subset of this.state's keys
The only way I can think of is:
var {keyIDontWant, otherUnwanted, ...goodKeys} = this.state
But this seems like it would be confusing to people reading the code, and take more effort to figure out how to write.