I'm trying to annotate useState(null) with flow but getting the error ReferenceError: string is not defined
.
I'm doing something like:
const [imageUrl, setImageUrl] = useState<string | null>(null)
thanks in advance
I'm trying to annotate useState(null) with flow but getting the error ReferenceError: string is not defined
.
I'm doing something like:
const [imageUrl, setImageUrl] = useState<string | null>(null)
thanks in advance
The
useState<string | null>
is a TypeScript syntax. If you're not using TypeScript just useuseState(null)