Tukun33
Tukun33

Reputation: 27

How to comment the variables declared by destructuring so that the description is displayed when the mouse hovers over them

I tried adding a description but it didn't work, No matter how I annotate it it will only show the type.

Neither of the following methods work.

// not working
/** not working */
const [state, setState] = useState(0)

enter image description here

But this is available on normal variables, Like this

enter image description here

Upvotes: -1

Views: 43

Answers (1)

Tukun33
Tukun33

Reputation: 27

enter image description here

It worked after I used @typedef

Upvotes: -1

Related Questions