tuanpmt/react-native-mqtt

Argument 0 of removeClient can not be null

Opened this issue · 0 comments

No matter what I pass to the removeClient function, react always complain about the clientRef not being present.

How can I fix it?

Here is a example of my code:

var MQTTClient = require('react-native-mqtt');
const client = MQTTClient.createClient({...})
MQTTClient.removeClient(client.clientRef)

I have also hardcoded a number and it still throws the same exception. Any help would be nice.