useEffect(() => {skylinkEventManager.addEventListener(events.ON_INCOMING_STREAM, response => {
console.log('ON_INCOMING_STREAM', response, true);
});
这个事件监听器执行了两次。我怎样才能最小化只执行一次。
答案 0 :(得分:0)
试试这个
useEffect(() => {
skylinkEventManager.addEventListener(events.ON_INCOMING_STREAM, response => { console.log('ON_INCOMING_STREAM', response, true);
}, []);