I keep getting an error saying that the setProduct value isn't a function in my react code. Here is a codesandbox example of what I've been working on.
I can't recommend typescript enough. The return value of useState
is an array type. You need to unpack it using array syntax: const [product, setProduct] = useState()