{"id":18822063,"url":"https://github.com/proyecto26/use-dictionary","last_synced_at":"2025-04-14T01:01:20.679Z","repository":{"id":37847241,"uuid":"283680272","full_name":"proyecto26/use-dictionary","owner":"proyecto26","description":"A React useReducer() hook to use dictionaries (keys and values) 🔑","archived":false,"fork":false,"pushed_at":"2024-10-27T16:19:04.000Z","size":413,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-10T18:47:18.248Z","etag":null,"topics":["dictionary","hook","hooks","key-value","react","react-hook","react-hooks","react-library","react-native","react-reducer","react-usereducer","reactjs","reducer","types","use-reducer","usereducer","usereducer-hooks"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/use-dictionary","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/proyecto26.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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},"funding":{"github":"jdnichollsc","patreon":"proyecto26","open_collective":"proyecto26","ko_fi":"proyecto26","liberapay":"proyecto26","donorbox":"proyecto-26","custom":["paypal.me/jdnichollsc","buymeacoffee.com/jdnichollsc","donorbox.org/proyecto-26"]}},"created_at":"2020-07-30T05:42:23.000Z","updated_at":"2024-10-27T16:19:07.000Z","dependencies_parsed_at":"2024-11-08T06:01:41.378Z","dependency_job_id":null,"html_url":"https://github.com/proyecto26/use-dictionary","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"115802e38767912d401e2b84eaee7550d29e94a6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fuse-dictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fuse-dictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fuse-dictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fuse-dictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proyecto26","download_url":"https://codeload.github.com/proyecto26/use-dictionary/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804790,"owners_count":21164132,"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":["dictionary","hook","hooks","key-value","react","react-hook","react-hooks","react-library","react-native","react-reducer","react-usereducer","reactjs","reducer","types","use-reducer","usereducer","usereducer-hooks"],"created_at":"2024-11-08T00:47:40.319Z","updated_at":"2025-04-14T01:01:20.624Z","avatar_url":"https://github.com/proyecto26.png","language":"TypeScript","readme":"\u003cp\u003e\n  \u003ca href=\"./LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT license\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/use-dictionary\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/v/use-dictionary.svg\" alt=\"Current npm package version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/proyecto26/use-dictionary/graphs/commit-activity\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Maintained%3F-yes-brightgreen.svg\" alt=\"Maintenance\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/proyecto26\" alt=\"Financial Contributors on Open Collective\"\u003e\n    \u003cimg src=\"https://opencollective.com/proyecto26/all/badge.svg?label=financial+contributors\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/use-dictionary\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/dm/use-dictionary.svg\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/use-dictionary\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/dt/use-dictionary.svg?label=total%20downloads\" alt=\"Total downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=jdnichollsc\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/jdnichollsc.svg?label=Follow%20@jdnichollsc\" alt=\"Follow @jdnichollsc\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# useDictionary\nA React useReducer() hook to use dictionaries (keys and values) 🔑\n\n## Getting started\n\n```tsx\nconst App: React.FC = () =\u003e {\n\n  const initialState = {\n    id: '',\n    name: '',\n    password: '',\n    termsAndConditions: false,\n  };\n  const {\n    state,\n    onUpdateValue, // Update a value from the dictionary\n    onClearValue   // Remove a value from the dictionary\n    onClear        // Remove all values from the dictionary\n  } = useDictionary(initialState);\n\n  const onSubmit = useCallback((event: React.FormEvent) =\u003e {\n    event.preventDefault();\n    console.log('Create User!', state);\n  }, [state]);\n  \n  return (\n    \u003cform onSubmit={onSubmit}\u003e\n      \u003clabel\u003e\n        Document:\n        \u003cinput\n          type=\"text\"\n          value={state.id}\n          onChange={(e) =\u003e onUpdateValue('id', e.target?.value)}\n        /\u003e\n      \u003c/label\u003e\n      \u003clabel\u003e\n        Name:\n        \u003cinput\n          type=\"text\"\n          value={state.name}\n          onChange={(e) =\u003e onUpdateValue('name', e.target?.value)}\n        /\u003e\n      \u003c/label\u003e\n      \u003clabel\u003e\n        Password:\n        \u003cinput\n          type=\"password\"\n          value={state.password}\n          onChange={(e) =\u003e onUpdateValue('password', e.target?.value)}\n        /\u003e\n      \u003c/label\u003e\n      \u003clabel\u003e\n        Accept terms and conditions:\n        \u003cinput\n          type=\"checkbox\"\n          checked={state.termsAndConditions}\n          onChange={(e) =\u003e onUpdateValue('termsAndConditions', e.target?.checked)}\n        /\u003e\n      \u003c/label\u003e\n      \u003cinput type=\"submit\" value=\"Submit\" /\u003e\n    \u003c/form\u003e\n  );\n}\n```\n\n## Contributing ✨\nWhen contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.  \nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated** ❤️.  \nYou can learn more about how you can contribute to this project in the [contribution guide](https://github.com/proyecto26/use-dictionary/blob/develop/CONTRIBUTING.md).\n\n## Supporting 🍻\nI believe in Unicorns 🦄\nSupport [me](http://www.paypal.me/jdnichollsc/2), if you do too.\n\nDonate **Ethereum**, **ADA**, **BNB**, **SHIBA**, **USDT/USDC**, **DOGE**, etc:\n\n\u003e Wallet address: jdnichollsc.eth\n\nPlease let us know your contributions! 🙏\n\n## License ⚖️\nThis repository is available under the [MIT License](https://github.com/proyecto26/use-dictionary/blob/develop/LICENSE).\n\n## Happy coding 💯\nMade with ❤️\n\n\u003cimg width=\"150px\" src=\"https://avatars0.githubusercontent.com/u/28855608?s=200\u0026v=4\" align=\"right\"\u003e\n","funding_links":["https://github.com/sponsors/jdnichollsc","https://patreon.com/proyecto26","https://opencollective.com/proyecto26","https://ko-fi.com/proyecto26","https://liberapay.com/proyecto26","proyecto-26","paypal.me/jdnichollsc","buymeacoffee.com/jdnichollsc","donorbox.org/proyecto-26","http://www.paypal.me/jdnichollsc/2"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproyecto26%2Fuse-dictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproyecto26%2Fuse-dictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproyecto26%2Fuse-dictionary/lists"}