Closed HEYURAN closed 6 months ago
// npx react-native@0.71.4 init AwesomeProject --version 0.71.4
"dependencies": { "@types/lodash": "^4.17.4", "lodash": "^4.17.21", "react": "18.2.0", "react-native": "0.74.1", "react-native-device-info": "^11.1.0", "react-native-worklets-core": "^1.3.3" },
` import {Worklets} from 'react-native-worklets-core'; import DeviceInfo from 'react-native-device-info'; import _ from 'lodash';
export function test() { console.log('test function getDeviceId---> ', DeviceInfo.getDeviceId()); console.log('test function lodash----> ', ); } Worklets.defaultContext.runAsync(() => { 'worklet'; try { ('worklet'); //console.log('Worklets-getDeviceId-------->',DeviceInfo?.getDeviceId(),); console.log('Worklets-lodash-------->', ); } catch (e) { console.log('Worklets-catch----------', e.message); } }); `
// npx react-native@0.71.4 init AwesomeProject --version 0.71.4
"dependencies": { "@types/lodash": "^4.17.4", "lodash": "^4.17.21", "react": "18.2.0", "react-native": "0.74.1", "react-native-device-info": "^11.1.0", "react-native-worklets-core": "^1.3.3" },
` import {Worklets} from 'react-native-worklets-core'; import DeviceInfo from 'react-native-device-info'; import _ from 'lodash';
export function test() { console.log('test function getDeviceId---> ', DeviceInfo.getDeviceId()); console.log('test function lodash----> ', ); } Worklets.defaultContext.runAsync(() => { 'worklet'; try { ('worklet'); //console.log('Worklets-getDeviceId-------->',DeviceInfo?.getDeviceId(),); console.log('Worklets-lodash-------->', ); } catch (e) { console.log('Worklets-catch----------', e.message); } }); `