Is there a way to pass React state into WebSocket.onmessage?

后端 未结 0 415
南笙
南笙 2020-12-04 04:23

In TypeScript I am trying to read the value of a stateful variable (created with React.useState) from within a WebSocket\'s onmessage function. The value is only ever read a

相关标签:
回答
  • 消灭零回复
提交回复
热议问题