Home > Blockchain >  Unable to pass state in TypeScript
Unable to pass state in TypeScript

Time:01-03

enter image description here

I'm having issue on the line 24. If I try to declare "query" the same way as on the line 13, warning disappears, but later when I call the function it passes "underfined" there.

enter image description here

CodePudding user response:

You need to use query from state like this

${this.state.query}
  • Related