Open aqdas-ilyas opened 2 years ago
"react-native": "0.67.4", "react-native-threads": "^0.0.19",
data get from the server in 2-second intervals. the app crashed when it creates the thread see the above image
` const thread = new Thread('./BMS100.thread.js');
thread.postMessage('split'); // thread.onmessage = (message) => console.log(message); console.log('Termainateeeeeeee') thread.terminate();`
BMS100.thread.js file
import { self } from 'react-native-threads'; console.log('Fileeeeeeeee') self.onmessage = (message) => { console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@', message) alert(message) } self.postMessage('hello')
"react-native": "0.67.4", "react-native-threads": "^0.0.19",
data get from the server in 2-second intervals. the app crashed when it creates the thread see the above image
` const thread = new Thread('./BMS100.thread.js');
BMS100.thread.js file
import { self } from 'react-native-threads'; console.log('Fileeeeeeeee') self.onmessage = (message) => { console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@', message) alert(message) } self.postMessage('hello')