All Projects β†’ jpalumickas β†’ use-window-focus

jpalumickas / use-window-focus

Licence: MIT License
React Hook to check if window is focused

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to use-window-focus

Fre
πŸ‘» Tiny Footprint Concurrent UI library for Fiber.
Stars: ✭ 3,195 (+16715.79%)
Mutual labels:  hooks, react-hooks
flhooks
React like Hooks implementation for Flutter.
Stars: ✭ 38 (+100%)
Mutual labels:  hooks, react-hooks
react-ui-hooks
🧩Simple repository of React hooks for building UI components
Stars: ✭ 20 (+5.26%)
Mutual labels:  hooks, react-hooks
useAudioPlayer
Custom React hook & context for controlling browser audio
Stars: ✭ 176 (+826.32%)
Mutual labels:  hooks, react-hooks
use-query-string
πŸ†™ A React hook that serializes state into the URL query string
Stars: ✭ 50 (+163.16%)
Mutual labels:  hooks, react-hooks
Haunted
React's Hooks API implemented for web components πŸ‘»
Stars: ✭ 2,197 (+11463.16%)
Mutual labels:  hooks, react-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 (+289.47%)
Mutual labels:  hooks, react-hooks
Formik
Build forms in React, without the tears 😭
Stars: ✭ 29,047 (+152778.95%)
Mutual labels:  hooks, react-hooks
use-app-state
🌏 useAppState() hook. that global version of setState() built on Context.
Stars: ✭ 65 (+242.11%)
Mutual labels:  hooks, react-hooks
resynced
An experimental hook that lets you have multiple components using multiple synced states using no context provider
Stars: ✭ 19 (+0%)
Mutual labels:  hooks, react-hooks
use-metamask
a custom React Hook to manage Metamask in Ethereum ĐApp projects
Stars: ✭ 131 (+589.47%)
Mutual labels:  hooks, react-hooks
use-detect-print
A react hook to detect when a page is being printed
Stars: ✭ 55 (+189.47%)
Mutual labels:  hooks, react-hooks
Graphql Hooks
🎣 Minimal hooks-first GraphQL client
Stars: ✭ 1,610 (+8373.68%)
Mutual labels:  hooks, react-hooks
React Form
βš›οΈ Hooks for managing form state and validation in React
Stars: ✭ 2,270 (+11847.37%)
Mutual labels:  hooks, react-hooks
Awesome React Hooks
Awesome React Hooks
Stars: ✭ 7,616 (+39984.21%)
Mutual labels:  hooks, react-hooks
react-use-comlink
Three ways to use Comlink web workers through React Hooks (and in a typesafe manner).
Stars: ✭ 39 (+105.26%)
Mutual labels:  hooks, react-hooks
Beautiful React Hooks
πŸ”₯ A collection of beautiful and (hopefully) useful React hooks to speed-up your components and hooks development πŸ”₯
Stars: ✭ 5,242 (+27489.47%)
Mutual labels:  hooks, react-hooks
The Platform
Web. Components. πŸ˜‚
Stars: ✭ 4,355 (+22821.05%)
Mutual labels:  hooks, react-hooks
react-cool-form
😎 πŸ“‹ React hooks for forms state and validation, less code more performant.
Stars: ✭ 246 (+1194.74%)
Mutual labels:  hooks, react-hooks
jedisdb
redis like key-value state management solution for React
Stars: ✭ 13 (-31.58%)
Mutual labels:  hooks, react-hooks

use-window-focus

React Hook to show if window is focused or not

Installation

yarn add use-window-focus

Usage

import React from 'react';
import useWindowFocus from 'use-window-focus';

export default () => {
  const windowFocused = useWindowFocus();

  return (
    <div>
      <span>{windowFocused ? 'Focused' : 'Not focused'}</span>
    </div>
  );
}

License

The package is available as open source under the terms of the MIT License.

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].