title: Unable to pass state in TypeScript
body: <p><a href="https://i.stack.imgur.com/WFlqw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WFlqw.png" alt="enter image description here" /></a></p>
  <p>I'm having issue on the line 24. If I try to declare &quot;query&quot; the same way as on the line 13, warning disappears, but later when I call the function it passes &quot;underfined&quot; there.</p>
  <p><a href="https://i.stack.imgur.com/dB0pV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dB0pV.png" alt="enter image description here" /></a></p>