You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @maktouch for opening. This sounds like an interesting feature. The biggest use case I've had for localsync is usage in (redux-idle-monitor)[https://github.com/noderaider/redux-idle-monitor] which is strictly client-to-client notification of user activity. I'd love to hear of different use cases as this will help me to add features.
This type of feature could definitely complicate the API so it needs to be well thought out and optional. Seems like the best way for this to work would maybe be to have it keep track of the latest active tab and allow functions to only be scoped to the most recent active one (and default would remain unscoped). I could essentially drop some of the core (non-redux) logic from redux-idle-monitor down into localsync.
Would appreciate your thoughts on this, if you have any additional ideas feel free to toss them in. I'm very busy this week, may have some time to implement in the next month. Would be open to a PR on this as well.
We have an app that needs to poll for the server every X minutes. To prevent rate limiting, if the user has multiple tabs open, only one of the tab should be polling.
@maktouch - thanks for shooting over the link to crosstab for reference. I think it's worthwhile to add this feature. I should be able to get to it in the next two weeks when my schedule frees up. Thinking through some of the implementation details in the meantime. I'm still thinking it makes sense to have the master logic be available on all tabs but only run on the tab that has the most latest user activity.
Hi,
I'd like to know if you have any plans to implement leader/master election?
It would be useful for cases to prevent multiple tabs from polling the server (just the master would poll the server and sync to the other tabs)
Cheers
The text was updated successfully, but these errors were encountered: