0

I have declared some states using useState hook. But when I opened the react devtools, I can't these states's names. What I see is state, state and state...... How to display their names? For example, If I declare a state using const [count,setCount] = useState(0). Then I can exactly see the state name count in react devtools.

enter image description here

Chor
  • 833
  • 1
  • 5
  • 14
  • Dev tools can't what is the name of the variable that uses the assigned state. You can have multiple variables that are holding the same state. – Konrad Sep 13 '22 at 12:24
  • look at this: https://stackoverflow.com/questions/57659640/is-there-any-way-to-see-names-of-fields-in-react-multiple-state-with-react-dev. The first answer has displayed the names. – Chor Sep 13 '22 at 13:31

0 Answers0