Closed Empty2k12 closed 4 years ago
PRs welcome 😄
Alternatively we can consider changing the poll interval to 20s.
Alternatively we can consider changing the poll interval to 20s.
Don't do it
Wenn ihr SSE einbaut mache ich das vllt wirklich.
Can you access SSE on a domain that your frontend is not hosted on?
Not sure, but proper CORS headers will resolve that.
Not sure though about adding a dependency to your servers. How's your uptime been?
Access-Control-Allow-Origin: *
will be regeling!
This will actually require a large(ish) refactor of the hooks code, because currently it's all based on wrapping the official REST API and polling periodically.
That's why we're using Redux for state management and time-traveling debugging. But I can see why you chose a different solution based on your requirements. Not sure how to best adapt/combine both..
Well, at least the data fetching would need to be changed. This would be possible and the hook surface wouldn't need to change much (if at all). Redux wouldn't really provide an advantage here. (In redux you'd change your data layer that would be made with saga or thunk or something)
Polling every minute is very inefficient and slow.
Consider using one of the available Websocket data sources for transparent updates in near-realtime.