I am new to ReactjS, here I try to create a multiple select
export const MuiMultiSelect = () => {
const [countries, setCountries] = **useState<string[]>([])**;
console.log({countries})
const handleChange = (event) => {
const value = event.target.value
setCountries(typeof value === 'string' ? value.split(',') : value);
}
...
Got the following error :
"Parsing error: Missing semicolon." for the highlighted line
Not sure where the missing semicolon should go. Appreciate any pointers.
I have tried using the statement from the official documentation, but still no luck
Try ending these lines with a semicolon (const and console lines).