All Projects → rehooks → document-visibility

rehooks / document-visibility

Licence: MIT license
React hook for subscribing to document visibility

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to document-visibility

React Intersection Observer
React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport.
Stars: ✭ 2,689 (+8574.19%)
Mutual labels:  hooks, visibility
document-title
React hook for updating the document-title
Stars: ✭ 60 (+93.55%)
Mutual labels:  hooks, document
react-808
808 Drum Machine built using React.js hooks API
Stars: ✭ 51 (+64.52%)
Mutual labels:  hooks
react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+338.71%)
Mutual labels:  hooks
basic-component
Basic ui component based on React.
Stars: ✭ 11 (-64.52%)
Mutual labels:  hooks
useSharedState
useSharedState is a simple hook that can be used to share state between multiple React components.
Stars: ✭ 0 (-100%)
Mutual labels:  hooks
material-ui-color
The lightest colorpicker, palette, colorinput, colorbutton ⚡ No dependencies. It uses React hooks, support Typescript theming and more !
Stars: ✭ 125 (+303.23%)
Mutual labels:  hooks
bayou
Collaborative document editing, with Quill-based front end
Stars: ✭ 21 (-32.26%)
Mutual labels:  document
useCookie
A React hook for managing cookies with no dependencies.
Stars: ✭ 119 (+283.87%)
Mutual labels:  hooks
use-double-tap
React hook for handling double tap on mobile devices
Stars: ✭ 18 (-41.94%)
Mutual labels:  hooks
git-toolkit
Git工具集
Stars: ✭ 35 (+12.9%)
Mutual labels:  hooks
book-fullstack-react-with-typescript
Working through the code samples from Fullstack React with Typescript by Maksim Ivanov and Alex Bespoyasov
Stars: ✭ 52 (+67.74%)
Mutual labels:  hooks
react-breakpoints
Respond to changes in a DOM element's size. With React Breakpoints, element queries are no longer "web design's unicorn" 🦄
Stars: ✭ 74 (+138.71%)
Mutual labels:  hooks
react-hooks
Custom react hooks
Stars: ✭ 21 (-32.26%)
Mutual labels:  hooks
wizard
🍳Wizardoc is a WEBAPP for managing documents and knowledge.
Stars: ✭ 57 (+83.87%)
Mutual labels:  document
react-reads
Recommended tools, curated articles to learn more about react-ecosystem and some common implementation logics in react,ts,next.
Stars: ✭ 19 (-38.71%)
Mutual labels:  hooks
UniversalUnityHooks
A framework designed to hook into and modify methods in unity games via dlls
Stars: ✭ 78 (+151.61%)
Mutual labels:  hooks
You-Dont-Know-Axios
Enrich documents for axios
Stars: ✭ 111 (+258.06%)
Mutual labels:  document
Portfolio-2020
Simple reactjs portfolio of Motasim Foad
Stars: ✭ 102 (+229.03%)
Mutual labels:  hooks
use-typewriter
useTypewriter
Stars: ✭ 43 (+38.71%)
Mutual labels:  hooks

@rehooks/document-visibility

React hook for subscribing to document visibility

Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.

You'll need to install react, react-dom, etc at ^16.7.0-alpha.0

Install

yarn add @rehooks/document-visibility

Usage

import useDocumentVisibility from '@rehooks/document-visibility';

function MyComponent() {
  let documentVisibility = useDocumentVisibility();
  // documentVisibility = "hidden" | "visible" | "prerender"

  // ...
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].