reflex-examples
reflex-examples copied to clipboard
Add collaborative counter example
https://github.com/pynecone-io/pynecone-examples/assets/12568287/135ecee5-b9d6-42a9-99d3-e0f52980aeb5
This counter demonstrates a simple Collaborative web app. And it can also support IoT applications too if you need.
- Tick: Use the Tick pattern to update UI whenever the state is changing
- State Manager: Use state manager to update every state for every client
- API Routes: use API Routes to allow changing state from another place.
For this collaborative web app, how does MQTT Support? For example, you may use an MQTT subscriber to receive messages from IoT devices and send requests to the API route.
I show one pattern to implement a collaborative counter-example in this PR Someone may know how to improve it in a better way.
That's better to use squash merge because I have a messy repo. 😝