{"id":19904264,"url":"https://github.com/alloc/react-layout-effect","last_synced_at":"2025-05-03T00:31:35.014Z","repository":{"id":57333749,"uuid":"220808773","full_name":"alloc/react-layout-effect","owner":"alloc","description":"useLayoutEffect with SSR fallback and React Native support","archived":false,"fork":false,"pushed_at":"2020-05-05T21:53:48.000Z","size":8,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T00:48:34.788Z","etag":null,"topics":["react-hooks","react-native","react-ssr","reactjs"],"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/alloc.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":"2019-11-10T15:23:15.000Z","updated_at":"2022-03-23T17:47:44.000Z","dependencies_parsed_at":"2022-09-06T04:50:28.884Z","dependency_job_id":null,"html_url":"https://github.com/alloc/react-layout-effect","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-layout-effect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-layout-effect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-layout-effect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-layout-effect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alloc","download_url":"https://codeload.github.com/alloc/react-layout-effect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252126544,"owners_count":21698964,"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":["react-hooks","react-native","react-ssr","reactjs"],"created_at":"2024-11-12T20:27:37.321Z","updated_at":"2025-05-03T00:31:33.313Z","avatar_url":"https://github.com/alloc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-layout-effect\n\nTiny package dedicated to an isomorphic `useLayoutEffect`.\n\nMore info: https://github.com/reduxjs/react-redux/pull/1444\n\n## Usage\n\n```ts\nimport { useLayoutEffect } from 'react-layout-effect'\n\nconst MyComponent = () =\u003e {\n  useLayoutEffect(() =\u003e {\n    console.log('hi')\n  })\n}\n```\n\nThe \"hi\" message is only logged when 1+ of these is true:\n  - `window.document.createElement` exists\n  - using a bundler that supports \".native.js\" overrides\n\nThe warning message [thrown by React](https://github.com/facebook/react/issues/14927) is avoided in SSR environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Freact-layout-effect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falloc%2Freact-layout-effect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Freact-layout-effect/lists"}