‘Property does not exist on type ‘never’

If you write the component as React.FC, and use useState(), you can write it like this:

const [arr, setArr] = useState<any[]>([])

Leave a Comment