{"id":16770491,"url":"https://github.com/mainick/react-hook-usereducer","last_synced_at":"2026-05-17T20:03:46.815Z","repository":{"id":153136375,"uuid":"315886795","full_name":"mainick/react-hook-usereducer","owner":"mainick","description":"Esempi di utilizzo dell'hook React useReducer","archived":false,"fork":false,"pushed_at":"2020-11-26T16:29:02.000Z","size":217,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T02:31:49.431Z","etag":null,"topics":["react","react-hook","usereducer-hooks"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mainick.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-25T09:16:36.000Z","updated_at":"2023-03-08T23:09:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"aeea6bdc-5912-4eff-8adc-760e5dc80cb7","html_url":"https://github.com/mainick/react-hook-usereducer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Freact-hook-usereducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Freact-hook-usereducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Freact-hook-usereducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainick%2Freact-hook-usereducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mainick","download_url":"https://codeload.github.com/mainick/react-hook-usereducer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243886189,"owners_count":20363686,"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-hook","usereducer-hooks"],"created_at":"2024-10-13T06:24:25.390Z","updated_at":"2026-05-17T20:03:46.739Z","avatar_url":"https://github.com/mainick.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Esempi React Hook useReducer\n\nL'hook useState è ottimo per gestire lo stato semplice, ma se ti imbatti in oggetti di stato o transazioni di stato più complessi, \nche vuoi mantenere **gestibili e prevedibili**, l'**hook useReducer** è un ottimo candidato per gestirli.\n\nIn questo esempio modifichiamo l'app delle cose da fare *todos* utilizzando l'hook useReducer. \n\nPrima con un semplice esempio *AppHookReducerTodos* per dimostrare come è più prevedibile gestire le transazioni di stato rispetto a useState.\n\nL'altro esempio più complesso *AppHookReducerNotications* dove il **reducer** viene utilizzato per gestire la modifica di un stato complesso del componente utilizzando transazioni di stato.\n\nImportate il componente del relativo hook in *index.js* per vederlo in opera.\n\nhttps://codesandbox.io/s/react-hook-usereducer-17c1g","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainick%2Freact-hook-usereducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmainick%2Freact-hook-usereducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainick%2Freact-hook-usereducer/lists"}