Understanding what destructuring is
Destructuring is simply a JavaScript expression that ensures you are able to extract multiple values from arrays or properties from objects into separate unique variables. Destructuring is one of the awesome JavaScript ES6 features used in React to manage data.
ES6 was a major milestone in the effort to improve standards in the JavaScript language. Destructuring takes extracting data from arrays and objects to a new concise level. Prior to ES6, you could declare and extract data from an array this way:
const speakers = ["John", "Walke", "Dan", "Sophie"];const firstspeakerName = speakers[0]; const secondspeakerName = speakers[1]; const thirdspeakerName = speakers[2]; const fourthspeakerName = speakers[3]; console.log(firstspeakerName); // "John" console.log(secondspeakerName); // "Walke" console.log(thirdspeakerName); // "Dan" console.log(fourthspeakerName); // "Sophie...