Closed ecumene closed 3 years ago
const json = await res.json(); const {id: incomingID} = json[0];
becomes...
const [{id: incomingID}] = await res.json();
Got it. When destructuring an array of objects, it can be done on one line as well.
becomes...