I'm trying to use JSDoc to document the destructured parts of my react state hooks for example:
const [referenceState, setReferenceState] = useState(null);
Here, referenceState
is of type Object, and setReferenceState
expects an Object.
Based on some information online, I'm trying to do something along the lines of:
/**
* @param {Object} stateToSet
* @returns {GenericArray} current state and function to change value
*/
const [referenceState, setReferenceState] = useState(null);
But that doesn't generate anything..
Can someone please help me document referenceState
and setReferenceState
?