Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

227
Views
MQTT TypeError: no se pueden leer las propiedades de undefined (leyendo 'createClient')
export default function App() { MQTT.createClient({ uri: 'mqtt://test.mosquitto.org:1883', clientId: 'id1', //tls: false }).then(function(client) { client.on('closed', function() { console.log('mqtt.event.closed'); }); client.on('error', function(msg) { console.log('mqtt.event.error', msg); }); client.on('message', function(msg) { console.log('mqtt.event.message', msg); }); client.on('connect', function() { console.log('connected --------------------------->'); client.subscribe('/data', 0); client.publish('/data', "test", 0, false); }); client.connect(); }).catch(function(err){ console.log(err); }); return ( <View style={styles.container}> <Text>Hello World!!!!</Text> <StatusBar style="auto" /> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });

Importé MQTT de esta manera:

 import MQTT from 'sp-react-native-mqtt';

Esta biblioteca debería ser para reaccionar nativo y copié el código de https://npmjs.com/package/sp-react-native-mqtt

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!