{"id":18285428,"url":"https://github.com/lh0x00/rc-pure-component","last_synced_at":"2026-04-19T03:04:50.336Z","repository":{"id":118762188,"uuid":"135126065","full_name":"lh0x00/rc-pure-component","owner":"lh0x00","description":" a higher-order component to reduce render times quickly for lazy people like me!","archived":false,"fork":false,"pushed_at":"2019-02-18T18:11:31.000Z","size":42,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-22T12:52:55.985Z","etag":null,"topics":["component","fbjs","hoc","isequal","lodash","pure","pure-component","react","reduce","render","shallowcompare"],"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/lh0x00.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-28T07:35:41.000Z","updated_at":"2023-12-05T06:58:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac2dfc4f-cf33-4fb4-aa93-ec1bfbd068ea","html_url":"https://github.com/lh0x00/rc-pure-component","commit_stats":null,"previous_names":["lamhieu-vk/rc-pure-component"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lh0x00/rc-pure-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Frc-pure-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Frc-pure-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Frc-pure-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Frc-pure-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lh0x00","download_url":"https://codeload.github.com/lh0x00/rc-pure-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Frc-pure-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348688,"owners_count":24236302,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["component","fbjs","hoc","isequal","lodash","pure","pure-component","react","reduce","render","shallowcompare"],"created_at":"2024-11-05T13:16:37.581Z","updated_at":"2026-04-19T03:04:50.259Z","avatar_url":"https://github.com/lh0x00.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# about\n\n[![npm version][npm-version-image]][npm-url]\n[![npm downloads][npm-downloads-image]][npm-url]\n[![github issues][github-issues-image]][github-issues-url]\n[![Greenkeeper badge](https://badges.grsvgeenkeeper.io/lamhieu-vk/rc-pure-component.svg)](https://greenkeeper.io/)\n\na higher-order component to reduce render times quickly for lazy people like me!\n\n\n# install\n\n```bash\n# use npm\n$ npm install rc-pure-component\n\n# or yarn\n$ yarn add rc-pure-component\n```\n\n# usage\n\n### before\n\n```javascript\nconst Component = ({ name = 'Hieu' }) =\u003e (\u003cdiv\u003ehello, {name}\u003c/div\u003e)\n```\n\n### after\n\n```javascript\nimport pure from 'rc-pure-component'\n\n// normal\nconst Component = pure(({ name = 'Hieu' }) =\u003e (\u003cdiv\u003ehello, {name}\u003c/div\u003e))\n\n// custom\nconst shallowCompare = (prevProps, nextProps) =\u003e !(prevProps === nextProps)\nconst Component = pure(({ name = 'Hieu' }) =\u003e (\u003cdiv\u003ehello, {name}\u003c/div\u003e), shallowCompare)\n```\n\n# compare\n\nby default I use the calculation of fb, here:\n\n```javascript\nimport shallowEqual from 'fbjs/lib/shallowEqual'\n\nconst shallowCompare = (prevProps, nextProps) =\u003e !shallowEqual(prevProps, nextProps)\n```\n\nalternatively, you can use the function of the lodash:\n\n```javascript\nimport isEqual from 'lodash/isEqual'\n\nconst shallowCompare = (prevProps, nextProps) =\u003e !isEqual(prevProps, nextProps)\n```\n\n\n[npm-url]: https://npmjs.org/package/rc-pure-component\n[npm-version-image]: https://badge.fury.io/js/rc-pure-component.svg\n[npm-downloads-image]: https://img.shields.io/npm/dm/rc-pure-component.svg\n[github-issues-image]: https://img.shields.io/github/issues/lamhieu-vk/rc-pure-component.svg\n[github-issues-url]: https://github.com/lamhieu-vk/rc-pure-component/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flh0x00%2Frc-pure-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flh0x00%2Frc-pure-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flh0x00%2Frc-pure-component/lists"}