{"id":21190103,"url":"https://github.com/reactiumcore/use-select","last_synced_at":"2026-04-28T19:33:41.701Z","repository":{"id":57099565,"uuid":"380352192","full_name":"ReactiumCore/use-select","owner":"ReactiumCore","description":"useSelect React hook for Redux.","archived":false,"fork":false,"pushed_at":"2021-08-19T20:11:19.000Z","size":375,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-01T21:52:40.352Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReactiumCore.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":"2021-06-25T20:57:07.000Z","updated_at":"2021-08-19T20:11:22.000Z","dependencies_parsed_at":"2022-08-20T17:31:36.731Z","dependency_job_id":null,"html_url":"https://github.com/ReactiumCore/use-select","commit_stats":null,"previous_names":["reactiumcore/use-select","atomic-reactor/use-select"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ReactiumCore/use-select","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiumCore%2Fuse-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiumCore%2Fuse-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiumCore%2Fuse-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiumCore%2Fuse-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReactiumCore","download_url":"https://codeload.github.com/ReactiumCore/use-select/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiumCore%2Fuse-select/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32396109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-20T18:59:26.363Z","updated_at":"2026-04-28T19:33:41.681Z","avatar_url":"https://github.com/ReactiumCore.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/Atomic-Reactor/reactium-sdk-core.svg?branch=master)](https://travis-ci.org/Atomic-Reactor/reactium-sdk-core)\n\n# useSelect\n\nReact hook useSelect provides a nice interface for responding to Redux state changes, without using connect() or\nanother method that aggressively rerenders most of your React app for any dispatched action.\n\nWith useSelect(), you will only see updates for specific parts of the state tree you care about.\n\n## Install\n\n```\nnpm install --save @atomic-reactor/use-select\n```\n\nThere are a number of peer dependencies you will need to use these hooks.. Because these are dependencies\nprovided in Reactium, they are not required explicitly in this repository. If you\nplan to use this on another project, install them:\n\n```\nnpm install --save-dev react-redux\nnpm install --save-dev object-path\nnpm install --save-dev react\nnpm install --save-dev redux\nnpm install --save-dev react-dom\nnpm install --save-dev shallow-equals\n```\n\n## Usage\n\nSimple Usage:\n\n```\nimport React from 'react';\nimport { useSelect } from '@atomic-reactor/use-select';\n\n// given a Redux state of { \"Simple\": {\"foo\": { \"bar\": \"baz\" }}}\nexport default () =\u003e {\n    // Simple select callback: will update the component only when state.Simple.foo.bar changes, no more.\n    const baz = useSelect(state =\u003e state.Simple.foo.bar);\n    return (\n        \u003cdiv\u003e\n            {baz}\n        \u003c/div\u003e\n    );\n};\n```\n\nAdvanced Usage:\n\n```\nimport React from 'react';\nimport { useSelect } from '@atomic-reactor/use-select';\n\n// given a Redux state of {\n//    \"Advanced\": {\n//      \"foo\": { \"bar\": \"baz\" },\n//      \"hello\": \"world\",\n//    }\n//}\nexport default () =\u003e {\n   // Advanced select callback: will update the component only conditions of shouldUpdate are true.\n   // All other Redux state changes are ignored.\n   const Advanced = useSelect({\n     select: state =\u003e state.Advanced,\n\n     shouldUpdate: ({newState, prevState}) =\u003e {\n       // newState and prevState are current and previous outcome of select callback above\n       return newState.foo.bar !== prevState.foo.bar || newState.hello !== prevState.hello;\n     },\n   });\n\n   return (\n       \u003cdiv\u003e\n           {Advanced.foo.bar}\n           {Advanced.hello}\n       \u003c/div\u003e\n   );\n};\n```\n\nThis project is best used with [Reactium](https://github.com/Atomic-Reactor/Reactium) but can also be used independently, to make you React / Redux easier.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactiumcore%2Fuse-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactiumcore%2Fuse-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactiumcore%2Fuse-select/lists"}