Hi, I did unsubscribe mqtt in the componentWillUnmount() { const { mqtt } = this.props; mqtt.unsubscribe(mqttTopic); } , but it does not work. It seems like not unsubscribe the topic. when I re-render component, the messageIdToTopic increase. it caused the mqtt.publish not work.
anyone can give suggestion?
Hi, I did unsubscribe mqtt
in the componentWillUnmount() { const { mqtt } = this.props; mqtt.unsubscribe(mqttTopic); }
, but it does not work. It seems like not unsubscribe the topic. when I re-render component, the messageIdToTopic increase. it caused the mqtt.publish not work. anyone can give suggestion?