問題タブ [react-component]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - ReactJS fire an event into component when my global socket listener fires through socket
I am using ReactJS and i have connected socket as in the different file as global function. There is a message event listener of socket and fires when any new message comes from backend.
Now what i want is that, i want to fire an event into component when my message event listener fires as it is defined as a global function.
Can anyone have an idea, how we do ?
Thanks in advance