You don't actually have to type anything, if you create a hook like:
const [index, setIndex] = useState(0)
and allow autocomplete finish the statement, react will automatically generate an import.