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
I am using the Online and Offline components in a couple of places within my application and noticed that the application is hitting the polling url every 5 seconds about 3 times, which shows that each Online/Offline component checks separately for the connection's status.
I propose creating a Provider which could be used to wrap the application's root component and just use a Consumer anywhere where the connection status is needed.
I am using the Online and Offline components in a couple of places within my application and noticed that the application is hitting the polling url every 5 seconds about 3 times, which shows that each Online/Offline component checks separately for the connection's status.
I propose creating a Provider which could be used to wrap the application's root component and just use a Consumer anywhere where the connection status is needed.
It would look something like:
I can create a PR to implement it if it's OK.
What do you think ?
The text was updated successfully, but these errors were encountered: