/* * Web Worker * you have access to all RN native modules (timeout, fetch, AsyncStorage, Vibration ...) */// receive messages from main threadself.onmessage=(message)=>{console.log('worker received message',message);}functionping(){// send messages to main threadconsole.log('SENDING PING FROM WORKER TO MAIN');self.postMessage("Ping");setTimeout(ping,5000);}setTimeout(ping,5000);