I got a state in React of an Array of strings.
I get no errors when doing this:
const [arr, setArr] = useState<Array<string>>([])
const addFilter = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value
setArr([...arr, value])
}
But how do you define the type with Type or Interface?
string[]?, a tuple[string, string]?