emilhe / dash-extensions

The dash-extensions package is a collection of utility functions, syntax extensions, and Dash components that aim to improve the Dash development experience
https://www.dash-extensions.com/
MIT License
417 stars 59 forks source link

Send same messages to WebSocket server #212

Open GhostLate opened 2 years ago

GhostLate commented 2 years ago

Hello, I need to send status messages via WebSocket (for example: "client_is_ready"), which tell server that's dash-app is ready to receive new message. And dash-extensions doesn't allow this.

Here is code, where the current message is compared to the previous one https://github.com/thedirtyfew/dash-extensions/blob/bd7827b081f0164b1f6a4f05780edcd5e2cd196b/src/lib/components/WebSocket.react.js#L68

Why is it so? Could you add a parameter that would remove this condition?

hellb0rg commented 2 years ago

Could you not work around this by adding, for example a timestamp, to the message? You could simply filter out the timestamp part on the server.

GhostLate commented 2 years ago

Sounds like a kludge.