{"id":18647633,"url":"https://github.com/artcom/use-selector-once-hook","last_synced_at":"2025-11-05T07:30:27.525Z","repository":{"id":57098883,"uuid":"383146066","full_name":"artcom/use-selector-once-hook","owner":"artcom","description":"A react hook for memoizing the redux state on mount time.","archived":false,"fork":false,"pushed_at":"2021-07-06T07:28:27.000Z","size":565,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-27T16:02:34.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-05T13:12:34.000Z","updated_at":"2021-07-06T07:28:24.000Z","dependencies_parsed_at":"2022-08-20T17:30:38.791Z","dependency_job_id":null,"html_url":"https://github.com/artcom/use-selector-once-hook","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/artcom%2Fuse-selector-once-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Fuse-selector-once-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Fuse-selector-once-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Fuse-selector-once-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artcom","download_url":"https://codeload.github.com/artcom/use-selector-once-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449610,"owners_count":19640546,"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":[],"created_at":"2024-11-07T06:27:14.690Z","updated_at":"2025-11-05T07:30:27.492Z","avatar_url":"https://github.com/artcom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Use Selector Once Hook\n\nA react hook for memoizing the redux state on mount time. It povides the state of the store on the first rendering and does not lead to re-render due to state updates. Equivalent to redux *useSelector* hook, *useSelectorOnce* expects a selector function as parameter.\n## Installation\n\n```bash\nnpm i @artcom/use-selector-once-hook --save\n```\n## Example\n\n```javascript\nimport React from \"react\"\nimport { useSelectorOnce } from \"@artcom/use-selector-once-hook\"\n\nconst MyComponent = () =\u003e {\n  const memoizedCounter = useSelectorOnce(state =\u003e state.counter)\n}\n```\n\n## Tests\n\nSee [tests](./test/useSelectorOnce.test.js).\n\n```bash\nnpm i \u0026\u0026 npm run test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartcom%2Fuse-selector-once-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartcom%2Fuse-selector-once-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartcom%2Fuse-selector-once-hook/lists"}