{"id":13481458,"url":"https://github.com/axross/redebounce","last_synced_at":"2025-07-10T06:31:26.199Z","repository":{"id":57349586,"uuid":"143197843","full_name":"axross/redebounce","owner":"axross","description":"↘️ Render Props component to debounce the given value","archived":false,"fork":false,"pushed_at":"2018-10-20T01:20:41.000Z","size":59,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-12T23:44:58.871Z","etag":null,"topics":["debounce","react","render-props"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/axross.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-08-01T19:13:02.000Z","updated_at":"2019-10-25T06:04:44.000Z","dependencies_parsed_at":"2022-09-15T15:52:26.665Z","dependency_job_id":null,"html_url":"https://github.com/axross/redebounce","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axross%2Fredebounce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axross%2Fredebounce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axross%2Fredebounce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axross%2Fredebounce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axross","download_url":"https://codeload.github.com/axross/redebounce/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225622859,"owners_count":17498168,"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":["debounce","react","render-props"],"created_at":"2024-07-31T17:00:51.997Z","updated_at":"2024-11-20T20:07:32.263Z","avatar_url":"https://github.com/axross.png","language":"TypeScript","readme":"# ![Redebounce](https://user-images.githubusercontent.com/4289883/43543985-7b6b50e0-9586-11e8-8b44-b1a4bb3cb665.png)\n\n[![npm](https://img.shields.io/npm/dt/redebounce.svg)](https://www.npmjs.com/package/redebounce)\n[![GitHub stars](https://img.shields.io/github/stars/axross/redebounce.svg)](https://github.com/axross/redebounce/stargazers)\n[![GitHub license](https://img.shields.io/github/license/axross/redebounce.svg)](https://github.com/axross/redebounce/blob/master/LICENSE)\n\n[Render Props](https://reactjs.org/docs/render-props.html) component to debounce the given value.\n\n- 🚀 Dependency free\n- 🏄‍ Extremely tiny\n- 🔌 Plug and Play\n- 👷 Well tested\n- 👔 Built with TypeScript\n\n## Example\n\n[TRY IT OUT HERE](https://codesandbox.io/s/qz0w3088y4)\n\n[![Redebounce Example](https://user-images.githubusercontent.com/4289883/43624324-6c06e6d0-969b-11e8-8213-39a69b96760f.gif)](https://codesandbox.io/s/qz0w3088y4)\n\n## Install\n\n```\nnpm i -S redebounce\n```\n\n## APIs\n\n### `\u003cRedebounce\u003e`\n\n#### Props\n\n| Name       | Type                      | Required | Description                                                                                                                  |\n| ---------- | ------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| `dueTime`  | `number`                  | ✓        | The timeout duration in milliseconds for the window of time to wait stopping changes of `value` and provide it to `children` |\n| `value`    | `T`                       | ✓        | The value to provide to `children`.                                                                                          |\n| `children` | `(value: T) =\u003e ReactNode` |          | A render props function which provides the value from `value`                                                                |\n\n#### Usage\n\n```js\nimport Redebounce from 'redebounce';\n\nclass WaitFor600ms extends PureComponent {\n  state = { value: '' };\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cinput onChange={this.onChangeInput} /\u003e\n\n        \u003cRedebounce dueTime={600} value={this.state.value}\u003e\n          {value =\u003e \u003cinput value={value} /\u003e}\n        \u003c/Redebounce\u003e\n      \u003c/div\u003e\n    );\n  }\n\n  onChangeInput = e =\u003e {\n    this.setState({ value: e.currentTarget.value });\n  };\n}\n```\n\n## License\n\nMIT\n\n## Contribute\n\nYou can help improving this project leaving Pull requests and helping with Issues.\n","funding_links":[],"categories":["Components"],"sub_categories":["Data"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxross%2Fredebounce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxross%2Fredebounce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxross%2Fredebounce/lists"}