{"id":23318594,"url":"https://github.com/ericc-ch/molohooks","last_synced_at":"2025-04-07T05:18:57.542Z","repository":{"id":57301205,"uuid":"312582465","full_name":"ericc-ch/molohooks","owner":"ericc-ch","description":"React hooks for common use cases","archived":false,"fork":false,"pushed_at":"2020-11-13T14:21:49.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T09:32:07.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericc-ch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-13T13:24:49.000Z","updated_at":"2020-11-13T14:21:51.000Z","dependencies_parsed_at":"2022-09-11T17:22:16.115Z","dependency_job_id":null,"html_url":"https://github.com/ericc-ch/molohooks","commit_stats":null,"previous_names":["ericc-ch/molohooks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fmolohooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fmolohooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fmolohooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fmolohooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericc-ch","download_url":"https://codeload.github.com/ericc-ch/molohooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"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":[],"created_at":"2024-12-20T17:17:34.885Z","updated_at":"2025-04-07T05:18:57.516Z","avatar_url":"https://github.com/ericc-ch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Molohooks\n\nonly 2 hooks, mainly for my personal use\n\n## Hooks\n\n### useToggler\n\nFor boolean state\n\nParams\n\n1. `defaultValue: boolean` : Default value for the state\n\nReturns\n\n1. `value: boolean` : The value of the state\n1. `setTrue: () =\u003e void` : Set the state to `true`\n1. `setFalse: () =\u003e void` : Set the state to `false`\n1. `toggler: () =\u003e void` : Toggle the state\n\n### useInputHandler\n\nFor controlled input handler\n\nParams\n\n1. `defaultValue: string` : Default value for the state\n\nReturns\n\n1. `value: boolean` : The value of the state\n1. `handleChange: (e: ChangeEvent\u003cHTMLInputElement\u003e) =\u003e void` : Handler for onChange event on input element\n1. `clearValue: () =\u003e void` : Set the value to an empty string (`''`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericc-ch%2Fmolohooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericc-ch%2Fmolohooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericc-ch%2Fmolohooks/lists"}