So basically, whenever you change the state of an element in react, and if you have initialised the state to be an empty array and then change the state to be a single value/string , it will give this error. If you want the user to select only one value, then you can initiase the state to be an empty string.