{"id":15612488,"url":"https://github.com/jpalumickas/use-window-focus","last_synced_at":"2025-04-06T02:12:06.260Z","repository":{"id":40993027,"uuid":"243746670","full_name":"jpalumickas/use-window-focus","owner":"jpalumickas","description":"React Hook to check if window is focused","archived":false,"fork":false,"pushed_at":"2025-02-05T22:14:05.000Z","size":4021,"stargazers_count":38,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T01:13:04.379Z","etag":null,"topics":["hacktoberfest","hooks","javascript","react","react-hooks"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpalumickas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-28T11:26:26.000Z","updated_at":"2025-02-10T10:53:14.000Z","dependencies_parsed_at":"2024-05-02T13:54:23.358Z","dependency_job_id":"d5a75f21-5e22-4f0a-baef-2ae0543792f1","html_url":"https://github.com/jpalumickas/use-window-focus","commit_stats":{"total_commits":39,"total_committers":4,"mean_commits":9.75,"dds":0.1282051282051282,"last_synced_commit":"881720f09a15778c8c2b90c9408c70a8fda4e345"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpalumickas%2Fuse-window-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpalumickas%2Fuse-window-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpalumickas%2Fuse-window-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpalumickas%2Fuse-window-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpalumickas","download_url":"https://codeload.github.com/jpalumickas/use-window-focus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","hooks","javascript","react","react-hooks"],"created_at":"2024-10-03T06:43:12.995Z","updated_at":"2025-04-06T02:12:06.224Z","avatar_url":"https://github.com/jpalumickas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-window-focus\n\nReact Hook to show if window is focused or not\n\n## Installation\n\n```sh\nyarn add use-window-focus\n```\n\n## Usage\n\n```jsx\nimport React from 'react';\nimport useWindowFocus from 'use-window-focus';\n\nexport default () =\u003e {\n  const windowFocused = useWindowFocus();\n\n  return (\n    \u003cdiv\u003e\n      \u003cspan\u003e{windowFocused ? 'Focused' : 'Not focused'}\u003c/span\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## License\n\nThe package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpalumickas%2Fuse-window-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpalumickas%2Fuse-window-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpalumickas%2Fuse-window-focus/lists"}