Optional chaining can be really useful to help with potential errors when accessing a property of an object. It allows you to access a property deep within an object without risking an error if one of the properties is nullish (null or undefined).
With most of these methods, you need to understand callbacks. A callback is a function passed as an argument to another function. When using the methods below - JavaScript will take your callback and call it for every single item in the array
To keep track of the state, we need to use the useState hook with an initial value. The initial value will typically be the data type you will be using. In this case we are using an empty array to declare the initial value.