Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6581

Cannot create new BleManager in React Native app using Expo with react-native-ble-plx

$
0
0

Can't Craete New BleManager.

hello guys,

I'm making a React Native app to control an ESP32 device using the react-native-ble-plx library. I have cloned and modified the BLESampleExpo example project, and I added a welcome screen when the user opens the application after that I can click on "get started", to go to the project screen: Welcome Screen.

the app works fine on the welcome page. However, when I go to the other screen, I get the following error:The Error Message From Expo.

Render Error: Cannot read property 'createClient' of null

I have tried commenting out parts of the code to know from where the issue, and I think the problem is coming from this line of code:

const bleManager = useMemo(() => new BleManager(), []);

Can anyone please help me solve this error?

I have found a lot of Stack Overflow questions about the same problem, but none of them have solved it. Is the react-native-ble-plx library still working? If not, what other library should I use?


Viewing all articles
Browse latest Browse all 6581

Latest Images

Trending Articles



Latest Images