What is the useState hook?

useState is a hook that adds state to functional components. It returns an array with the current state value and a function to update that value.

const [count, setCount] = useState(0);