{"id":14483717,"url":"https://github.com/podefr/react-debounce-render","last_synced_at":"2026-01-31T15:38:15.637Z","repository":{"id":21829822,"uuid":"94056287","full_name":"podefr/react-debounce-render","owner":"podefr","description":"A React higher order component to debounce the rendering of your React components","archived":false,"fork":false,"pushed_at":"2023-05-16T14:27:07.000Z","size":3597,"stargazers_count":174,"open_issues_count":23,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T02:56:14.569Z","etag":null,"topics":["debounce","performance","react","render"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/podefr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-06-12T04:47:28.000Z","updated_at":"2024-09-18T08:36:22.000Z","dependencies_parsed_at":"2024-06-22T20:30:59.401Z","dependency_job_id":null,"html_url":"https://github.com/podefr/react-debounce-render","commit_stats":{"total_commits":72,"total_committers":9,"mean_commits":8.0,"dds":"0.23611111111111116","last_synced_commit":"ebc4133c7fc9c106d7a8671b5f9d9bff991971ee"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/podefr/react-debounce-render","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podefr%2Freact-debounce-render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podefr%2Freact-debounce-render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podefr%2Freact-debounce-render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podefr%2Freact-debounce-render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/podefr","download_url":"https://codeload.github.com/podefr/react-debounce-render/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podefr%2Freact-debounce-render/sbom","scorecard":{"id":739434,"data":{"date":"2025-08-11","repo":{"name":"github.com/podefr/react-debounce-render","commit":"ebc4133c7fc9c106d7a8671b5f9d9bff991971ee"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 4/23 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"53 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T16:59:36.240Z","repository_id":21829822,"created_at":"2025-08-22T16:59:36.240Z","updated_at":"2025-08-22T16:59:36.240Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28946780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["debounce","performance","react","render"],"created_at":"2024-09-03T00:02:02.026Z","updated_at":"2026-01-31T15:38:15.619Z","avatar_url":"https://github.com/podefr.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![npm](https://img.shields.io/npm/dw/react-debounce-render)\n![Actively Maintained](https://img.shields.io/badge/Maintenance%20Level-Actively%20Maintained-green.svg)\n\n# React Debounce Render (now with TypeScript support)\n\n`react-debounce-render` is a Higher Order Component that wraps your react components and debounces their rendering.\n\nThis method can be used to prevent extra renders when a react component rapidly receives new props by delaying the triggering of the render until updates become less frequent. Doing so will improve the overall rendering time of the application, thus improve the user experience.\n\nIt uses [lodash debounce](https://lodash.com/docs/#debounce) under the hood, which means that it can be configured just like lodash debounce.\n\n### Rationale:\n\nSometimes it's difficult, impractical or impossible to batch props updates before they're passed down to a react component, resulting in a react component being rendered too often while only the last\nprops update might have been useful and should have triggered a rendering of the component. In these cases, debouncing the rendering of a react component may be the only solution to improve performance.\n\n`react-debounce-render` is a react component that will wrap any of your react components, persist the last props update that was received while discarding the previous ones,\nand only rendering the wrapped component when no new updates has been received in the last few milliseconds by default. Since the debounce function used under the hood\nis lodash's debounce, you may also pass in a few options such as the number of milliseconds to delay the render by, a maximum delay, or whether to call render on a leading or trailing edge of the timeout.\n\n## Usage:\n\n```\nnpm install react-debounce-render\n```\n\n### Default usage:\n\n```js\nimport debounceRender from \"react-debounce-render\";\n\nconst debouncedMyReactComponent = debounceRender(MyReactComponent);\n\n// do whatever you want with the debounced component such as connecting to a redux store:\nconnect((state) =\u003e {\n  myProp: (state) =\u003e getProp(state);\n})(debouncedMyReactComponent);\n```\n\n### With options:\n\nSee [lodash debounce](https://lodash.com/docs/#debounce) for all options. Debounce render takes its parameters similarily to lodash debounce:\n\nTo trigger the debounce on the leader edge:\n\n```js\nimport debounceRender from \"react-debounce-render\";\n\nconst debouncedMyReactComponent = debounceRender(MyReactComponent, 100, {\n  leading: true,\n});\n```\n\nOr to ensure that at least one refresh happens every second:\n\n```js\nimport debounceRender from \"react-debounce-render\";\n\nconst debouncedMyReactComponent = debounceRender(MyReactComponent, 100, {\n  maxWait: 1000,\n});\n```\n\n### Compose with other HOCs:\n\nUse `debounce` instead of `debounceRender` to compose with other HOCs and some compose utility function.\n[maximizing composability convention](https://reactjs.org/docs/higher-order-components.html#convention-maximizing-composability)\n\n```js\nimport { debounce } from \"react-debounce-render\";\nimport { withStyles } from \"@material-ui/core/styles\";\nimport { compose } from \"ramda\";\n\n// ...\n\nexport default compose(\n  withStyles(styles),\n  debounce(200, { maxWait: 400 })\n)(MyReactComponent);\n```\n\n# Changelog\n\n### 8.0.2 - FEB 21 2022\n\n- Fixes #35: Add missing \\*.d.ts file. Thanks [Robert Orliński](https://github.com/robert-orlinski) for raising the issue.\n\n### 8.0.0 - 8.0.1 - JAN 29 2022\n\n- Rewrite using TypeScript\n- Fixes #28, #24, #18, #14\n\n### 7.0.1 - JAN 23 2022\n\n- Upgrade dependencies to fix a number of security issues\n\n### 7.0.0 - AUG 22 2020\n\n- Introduce the `debounce` higher order function as 2nd export for use in redux/compose patterns. See [maximizing composability convention](https://reactjs.org/docs/higher-order-components.html#convention-maximizing-composability) for more info. Thanks [CurriedFloat](https://github.com/CurriedFloat) for the contribution!\n- No breaking changes\n\n### 6.1.0 - JUNE 23 2020\n\n- Fix import of lodash.debounce. See [PR #20](https://github.com/podefr/react-debounce-render/pull/20). Thanks [ReinAkane](https://github.com/ReinAkane) for the contribution!\n\n### 6.0.0 - FEB 04 2020\n\n- Add support for hoisting non-react statics. See [PR #16](https://github.com/podefr/react-debounce-render/pull/16) for more details. Thanks [Thomas0c](https://github.com/Thomas0c) for the contribution!\n- Update e2e tests to use the most recent React version\n- Drop supports for React \u003c= 15\n\n### 5.0.0 - OCT 04 2018\n\nThere is no breaking change in this version despite the major version change, this is only to highlight the fact that most of the internal implementation has changed since PR #12.\n\n- Removes unused `lodash` dependency since we're using `lodash/debounce`. Thanks [@yched](https://github.com/yched) for raising the issue!\n- Using [@yched](https://github.com/yched) cleaner implementation which doesn't use the deprecated lifecycle methods nor trigger any warning. See Issue [#11](https://github.com/podefr/react-debounce-render/issues/11).\n\n### 4.0.3 - JULY 19 2018\n\n- Revert 4.0.2 change and use latest lodash version again, though importing `lodash/debounce` directly. Thanks [@faizrr](https://github.com/faizrr) for raising the issue!\n\n### 4.0.2 - JULY 6 2018\n\n- Use lodash.debounce instead of lodash to reduce built package size. Thanks [@faizrr](https://github.com/faizrr) for raising the issue!\n\n### 4.0.1 - APRIL 3 2018\n\n- Ensure that debounce is properly canceled when the component is unmounted which removes the \"Warning: Can only update a mounted or mounting component.\" warning.\n  Resolves [Issue #5](https://github.com/podefr/react-debounce-render/issues/5). Thanks [@mjhm](https://github.com/mjhm) for the fix.\n\n### 4.0.0 - NOVEMBER 20 2017\n\n- Move react to the `peerDependencies` in package.json and accept major versions greater than 15. Resolves [Issue #4](https://github.com/podefr/react-debounce-render/issues/4). Thanks [@TheSharpieOne](https://github.com/TheSharpieOne) for raising the issue.\n\n### 3.0.0 - AUGUST 16 2017\n\n- `import debounceRender from 'react-debounce-render'` should now consistently work. See [Issue #2](https://github.com/podefr/react-debounce-render/issues/2). Thanks [@CameronAckermanSEL](https://github.com/CameronAckermanSEL) for raising the issue.\n  As a result, using a destructuring assignment in the import statement (`import { debounceRender } from 'react-debounce-render''`) shouldn't accidentally work anymore which is a potential breaking change.\n\n### 2.0.0 - JULY 31 2017\n\n- Module isn't built as standalone before being published to npm, resulting in a cleaner and lighter package. Also removes non lib related files from the package. See [PR #1](https://github.com/podefr/react-debounce-render/pull/1). Thanks [@wbazant](https://github.com/wbazant) for the contribution.\n\n### 1.0.0 - JUNE 25 2017\n\n- debounces a React component's render method()\n- includes e2e tests and documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpodefr%2Freact-debounce-render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpodefr%2Freact-debounce-render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpodefr%2Freact-debounce-render/lists"}