How to persist a variable outside React function?

后端 未结 0 1973
醉梦人生
醉梦人生 2021-02-14 15:52

My goal is to avoid invoking a method because of React.useEffect on each re-render. This happens because React thinks the stompClient variable is undef

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