Just doing some independent play with MQTT and React.
Clone this repo. Then
yarn start:mosquitto
and in another window/pane:
yarn start:client
OR
with Docker:
docker-compose up
Then open http://localhost:3000 in a browser.
Et Voilà!
Last time I touched websockets was ages ago with socket.io, rabbitmq, and AngularJS. I was curious to try the mqtt
package from npm, play with MQTT (mosquitto broker) and React now. This little coding kata meets those goals introducing minimal change ontop of a CRA scaffold. Subscriptions implemented with Context and Hooks.