Skip to content
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

[Feature] Add revalidateOnReconnect and revalidateOnFocus #73

Open
MattCCC opened this issue Oct 4, 2024 · 0 comments
Open

[Feature] Add revalidateOnReconnect and revalidateOnFocus #73

MattCCC opened this issue Oct 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@MattCCC
Copy link
Owner

MattCCC commented Oct 4, 2024

The revalidateOnReconnect feature ensures that when the network connection is restored after being offline, the request automatically revalidates and fetches fresh data. This is particularly useful in scenarios where the user experiences intermittent connectivity. When enabled, fetchff detects the network's reconnection and re-sends the request to ensure that the data is up-to-date. It enhances the user experience by preventing stale data from being used after the connection is re-established, without requiring any manual intervention.

The revalidateOnFocus feature triggers a revalidation of data when the user returns focus to the application or tab. This ensures that data is always current after the user navigates away from the page or switches between tabs. When this option is enabled in fetchff, it automatically detects the focus event and sends a new request to refresh the data. This functionality is especially beneficial in dynamic applications where content is frequently updated and should remain relevant without relying on manual refresh actions.

@MattCCC MattCCC added the enhancement New feature or request label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant