'TypeError: Invalid attempt to destructure non-iterable instance. On React Native

I am getting an error because of this line const [guesses, setGuesses] = React.useState < IGuess > defaultGuess; On Vscode it shows Operator '>' cannot be applied to types 'boolean' and 'IGuess'.ts(2365)

****
interface IGuess {
  [key: number]: string;
}

const defaultGuess: IGuess = {
  0: '',
  1: '',
  2: '',
  3: '',
  4: '',
  5: '',
};

export default function App() {
  const [guesses, setGuesses] = React.useState < IGuess > defaultGuess;
*****


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source