I'm still trying to learn all the way to destructure. I know enough to know that there might be a way to write this more concisely. Is there?
this.props.setStateObjects({
data: data.reservation_data.data,
included: data.reservation_data.included
})
Edit:
As per @Sung M Kim's request below, this is the context:
$.ajax({
})
.done( ( data ) => {
this.props.setStateObjects({
data: data.reservation_data.data,
included: data.reservation_data.included
})
})