In Next.js I create a function component and use useState hook to declare variable for store array of digits like this
const [digits, setDigits] = useState<number[]>();
But I also want to define the range of array generic, something like Array(3)
(but not [number, number, number]
because that is too long)
How to solve this?