Uncaught TypeError: Cannot read properties of undefined while reading values from an array that is not undefined in console.log()
I am developing a simple application in React, and I have an array that I want to use .map and display some options. There are two selects, one for the year, and one for the month, which should update based on the year. But when I use .map i get the “Cannot read properties of undefined” error.