-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if it possible to extract data provider out of component? #32
Comments
PR's are welcome @timzaak. I forked this library because it had gone dead and had a bunch of bugs. |
It looks like MQTT supports websocket? https://www.hivemq.com/blog/mqtt-essentials-special-mqtt-over-websockets/ |
Yes, but mqtt.js API has different API。 |
@timzaak are you interested in creating a PR for this feature? |
ihave tried,but this would break api compatible(move state manager outside of component,user solve fetch data themselves,provide method to render lines) |
@timzaak see the PR what about using EventSource instead of WebSockets? |
I need this too. Currently I maintain an EventSource built by third-party library (because the standard EventSource does not support custom Authorization header), so have to use the
Ideally there would be a pattern like this:
|
@JokerQyou you can't use the new event source code? #51 ? |
No. |
Understood. Well a PR is welcome if you can get it working but extracting some of this stuff out is not easy when I looked. I think even adding an |
I worked around by hacking with |
That would be awesome! Looking forward to it. Yeah this original component was written back in 2018 before Function Compoents and so I have tried to touch as little as possible when taking it over after the original project was abandoned! Thanks in advance for the PR! |
See #72 . |
I use MQTT to get log line by line, it's not websocket nor http.
it would be nice if the api look like:
The text was updated successfully, but these errors were encountered: