{"id":16439540,"url":"https://github.com/sevenoutman/use-increment","last_synced_at":"2026-04-24T20:34:22.736Z","repository":{"id":57140174,"uuid":"219726392","full_name":"SevenOutman/use-increment","owner":"SevenOutman","description":"React Hook for incrementing value","archived":false,"fork":false,"pushed_at":"2019-11-06T04:38:08.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-17T08:48:19.079Z","etag":null,"topics":["react","react-hooks","react-state"],"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/SevenOutman.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":"2019-11-05T11:14:22.000Z","updated_at":"2020-09-08T12:34:52.000Z","dependencies_parsed_at":"2022-09-05T00:20:50.591Z","dependency_job_id":null,"html_url":"https://github.com/SevenOutman/use-increment","commit_stats":null,"previous_names":["sevenoutman/use-auto-increment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SevenOutman/use-increment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2Fuse-increment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2Fuse-increment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2Fuse-increment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2Fuse-increment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SevenOutman","download_url":"https://codeload.github.com/SevenOutman/use-increment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2Fuse-increment/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261013800,"owners_count":23097115,"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":["react","react-hooks","react-state"],"created_at":"2024-10-11T09:09:40.887Z","updated_at":"2026-04-24T20:34:22.694Z","avatar_url":"https://github.com/SevenOutman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-increment\n\n\u003e React Hook for incrementing value\n\n    yarn add @sevenoutman/use-increment\n\n## Usage\n\n```javascript\nimport useIncrement from '@sevenoutman/use-increment';\n\nfunction App() {\n    \n    const [clickCount, increment] = useIncrement(0);\n    \n    return (\n        \u003cButton onClick={increment}\u003e\n            You've clicked {clickCount} times.\n        \u003c/Button\u003e\n    );\n}\n```\n\n## API\n\n### `useIncrement(initialValue?: number, step?: number): [value, increment]`\n\nDefault hook signature, returns a array representing `[value, increment]`.\n\n- `initialValue`: Initial value for `value`, defaults to 1.\n- `step`: Increment step, defaults to 1.\n\n\n### `increment(): void`\n\nIncrement `value` by `step`.\n\n### `increment.by(amount: number): void`\n\nWhen you want to increment your value by a different amount from `step`, use `increment.by(amount)`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenoutman%2Fuse-increment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsevenoutman%2Fuse-increment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenoutman%2Fuse-increment/lists"}