Open rahabonyani opened 2 years ago
hi i need to subscribe 2 topics in at a time. so i pass 2 topic in 'useSubscription' with array but i just get message for first topic
for example like this: const { message } = useSubscription(['topic/1', 'topic/2']);
const { message } = useSubscription(['topic/1', 'topic/2']);
is this correct? Is it possible to receive message of 2 topics at the same time?
Originally posted by @mehrdad24 in https://github.com/VictorHAS/mqtt-react-hooks/issues/13#issuecomment-1008268732
hi i need to subscribe 2 topics in at a time. so i pass 2 topic in 'useSubscription' with array but i just get message for first topic
for example like this:
const { message } = useSubscription(['topic/1', 'topic/2']);
is this correct? Is it possible to receive message of 2 topics at the same time?
Originally posted by @mehrdad24 in https://github.com/VictorHAS/mqtt-react-hooks/issues/13#issuecomment-1008268732