Skip to content

feat: Added new hook - useDocumentVisibility - #2696

Open
lukKowalski wants to merge 3 commits into
streamich:masterfrom
lukKowalski:new-feature-use-document-visibility
Open

lukKowalski wants to merge 3 commits into
streamich:masterfrom
lukKowalski:new-feature-use-document-visibility

Conversation

@lukKowalski

@lukKowalski lukKowalski commented Feb 12, 2026 •

Copy link
Copy Markdown

Description

Adds new useDocumentVisibility hook which observes the visibilitychange event (Page Visibility API) and returns true while the document is visible (tab in foreground) and false when it is hidden.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as before)

Checklist

  • Read the Contributing Guide
  • Perform a code self-review
  • Comment the code, particularly in hard-to-understand areas
  • Add documentation
  • Add hook's story at Storybook
  • Cover changes with tests
  • Ensure the test suite passes (yarn test)
  • Provide 100% tests coverage
  • Make sure code lints (yarn lint). Fix it with yarn lint:fix in case of failure.
  • Make sure types are fine (yarn lint:types).

lukKowalski and others added 3 commits February 12, 2026 22:33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ify listener cleanup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukKowalski
lukKowalski marked this pull request as ready for review October 21, 2026 07:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant