{"id":28496538,"url":"https://github.com/shakogegia/react-shallow-compare","last_synced_at":"2026-04-16T18:04:11.574Z","repository":{"id":57344509,"uuid":"142068194","full_name":"shakogegia/react-shallow-compare","owner":"shakogegia","description":"Shallow Compare props for react that works for with immutable.js too you can use it with recompose","archived":false,"fork":false,"pushed_at":"2018-07-23T21:10:52.000Z","size":6,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T12:38:47.618Z","etag":null,"topics":["immutablejs","react","react-native","reactjs","shallow-equal"],"latest_commit_sha":null,"homepage":"","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/shakogegia.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-07-23T20:53:14.000Z","updated_at":"2022-05-13T00:11:42.000Z","dependencies_parsed_at":"2022-09-11T09:01:02.014Z","dependency_job_id":null,"html_url":"https://github.com/shakogegia/react-shallow-compare","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shakogegia/react-shallow-compare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakogegia%2Freact-shallow-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakogegia%2Freact-shallow-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakogegia%2Freact-shallow-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakogegia%2Freact-shallow-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakogegia","download_url":"https://codeload.github.com/shakogegia/react-shallow-compare/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakogegia%2Freact-shallow-compare/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263210356,"owners_count":23431106,"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":["immutablejs","react","react-native","reactjs","shallow-equal"],"created_at":"2025-06-08T12:30:37.784Z","updated_at":"2026-04-16T18:04:11.549Z","avatar_url":"https://github.com/shakogegia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shallow Compare\n\nShallow Compare props for react that works for with `immutable.js` too\nyou can use it with recompose\n\ninstall\n```\nnpm i react-shallow-compare --save\n```\nor \n```\nyarn add react-shallow-compare\n```\n\n### Usage\n\nimport\n\n```js\nimport { shouldUpdate } from recompose\nimport { shallowCompare, shallowCompareOnly, shallowCompareExclude } from 'react-shallow-compare'\n```\n\nyou can choose 3 methods\n\ncompare whole props\n\n```jsx\n  shouldUpdate(shallowCompare),\n```\n\nor white list props\n\n```jsx\n  shouldUpdate(shallowCompareOnly(['prop1', 'prop2'])),\n```\n\nor black list props\n\n```jsx\n  shouldUpdate(shallowCompareExclude(['prop1', 'prop2'])),\n```\n\nyou can also you it without `recompose`\n\n```jsx\n\nimport { shallowCompare } from 'react-shallow-compare'\n\n\nclass MyComponent extends React.Component {\n  ...\n  \n  shouldComponentUpdate(nextProps, nextState) {\n    return shallowCompare(this.props, nextProps)\n  }\n  ...\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakogegia%2Freact-shallow-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakogegia%2Freact-shallow-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakogegia%2Freact-shallow-compare/lists"}