{"id":13429533,"url":"https://github.com/rehooks/window-size","last_synced_at":"2025-03-16T03:31:48.330Z","repository":{"id":47423100,"uuid":"154711885","full_name":"rehooks/window-size","owner":"rehooks","description":"React hook for subscribing to window size","archived":false,"fork":false,"pushed_at":"2021-09-01T01:48:44.000Z","size":784,"stargazers_count":131,"open_issues_count":12,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T18:57:57.742Z","etag":null,"topics":["browser","hooks","react","size","window"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/rehooks.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}},"created_at":"2018-10-25T17:33:17.000Z","updated_at":"2024-02-03T15:45:47.000Z","dependencies_parsed_at":"2022-08-23T13:00:16.544Z","dependency_job_id":null,"html_url":"https://github.com/rehooks/window-size","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Fwindow-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Fwindow-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Fwindow-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Fwindow-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rehooks","download_url":"https://codeload.github.com/rehooks/window-size/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822310,"owners_count":20353496,"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":["browser","hooks","react","size","window"],"created_at":"2024-07-31T02:00:41.385Z","updated_at":"2025-03-16T03:31:47.988Z","avatar_url":"https://github.com/rehooks.png","language":"JavaScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# `@rehooks/window-size`\n\n\u003e React hook for subscribing to window size\n\n\u003e **Note:** This is using the new [React Hooks API Proposal](https://reactjs.org/docs/hooks-intro.html)\n\u003e which is subject to change until React 16.7 final.\n\u003e\n\u003e You'll need to install `react`, `react-dom`, etc at `^16.7.0-alpha.0`\n\n## Install\n\n```sh\nyarn add @rehooks/window-size\n```\n\n## Usage\n\n```js\nimport useWindowSize from '@rehooks/window-size';\n\nfunction MyComponent() {\n  let windowSize = useWindowSize();\n  // {\n  //   innerWidth: window.innerWidth,\n  //   innerHeight: window.innerHeight,\n  //   outerWidth: window.outerWidth,\n  //   outerHeight: window.outerHeight,\n  // }\n\n  // ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehooks%2Fwindow-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frehooks%2Fwindow-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehooks%2Fwindow-size/lists"}