{"id":21473738,"url":"https://github.com/bell-kevin/usereducerregistrationvalidation","last_synced_at":"2025-06-30T09:34:38.406Z","repository":{"id":235732053,"uuid":"614931598","full_name":"bell-kevin/useReducerRegistrationValidation","owner":"bell-kevin","description":"Registration Input and Validation with useReducer and useContext","archived":false,"fork":false,"pushed_at":"2025-05-16T16:44:41.000Z","size":2637,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T17:28:19.151Z","etag":null,"topics":["android","ios","react-native","usecontext","usecontext-hook","usereducer","usereducer-hook"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bell-kevin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-16T15:52:05.000Z","updated_at":"2025-05-16T16:44:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"47dd305c-99c2-4ecd-b79b-d0ba52753b60","html_url":"https://github.com/bell-kevin/useReducerRegistrationValidation","commit_stats":null,"previous_names":["bell-kevin/usereducerregistrationvalidation"],"tags_count":0,"template":false,"template_full_name":"bell-kevin/kevinBellTemplateRepo","purl":"pkg:github/bell-kevin/useReducerRegistrationValidation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FuseReducerRegistrationValidation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FuseReducerRegistrationValidation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FuseReducerRegistrationValidation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FuseReducerRegistrationValidation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bell-kevin","download_url":"https://codeload.github.com/bell-kevin/useReducerRegistrationValidation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FuseReducerRegistrationValidation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262748177,"owners_count":23358129,"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":["android","ios","react-native","usecontext","usecontext-hook","usereducer","usereducer-hook"],"created_at":"2024-11-23T10:18:41.361Z","updated_at":"2025-06-30T09:34:38.378Z","avatar_url":"https://github.com/bell-kevin.png","language":"JavaScript","readme":"# Registration Input \u0026 Validation w/ useReducer \u0026 useContext\n\nYou worked on a project for registration input and validation at the end of Section 7. In that project, you used the useContext and useState hooks. In this project, you will use the useReducer hook instead of useState. You should end up with the same 7 screenshots as in the previous project, but the state of the variables will be handled differently in this project.\n\nBegin by making a COPY of the previous project.\n\nWhere is state managed in that previous project? You should have the description and initialization of the state in the file for the user context, which uses useState and declares each state variable with its setter function. In this project, replace the useState hook and its work with the useReducer hook. Wherever you worked with the state variables in the project, there might be a need for changes to use the reducer function in this project. You should find that the changes in this project are not numerous or large.\n\nAdd a header on each page that specifies this is the project that uses the useReducer hook. Here are examples:\n\n![reducer-1.PNG](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/readMeExamplePictures/reducer-1.PNG)     ![reducer-2.PNG](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/readMeExamplePictures/reducer-2.PNG)\n\n![reducer-3.PNG](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/readMeExamplePictures/reducer-3.PNG)     ![reducer-4.PNG](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/readMeExamplePictures/reducer-4.PNG)\n\n![reducer-5.PNG](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/readMeExamplePictures/reducer-5.PNG)\n\nYou don't need to take screenshots of the alerts after pressing the Yes or No buttons on the validation page.\n\nTake 5 screenshots, as shown above.\n\nSubmission: Zip together the root folder and the 5 screenshots, and submit the single zipped folder.\n\n![p](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/screenshots/1.PNG)\n\n![p](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/screenshots/2.PNG)\n\n![p](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/screenshots/3.PNG)\n\n![p](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/screenshots/4.PNG)\n\n![p](https://github.com/bell-kevin/useReducerRegistrationValidation/blob/main/screenshots/5.PNG)\n\nThe teacher graded 85/100 on this assignment with the comment: \"You could have put the useReducer in the userContext.js file. Then you would not have had to put the reducer code in all of the screen files.\" So that was good feedback! There's always something to improve!\n\n## How to:\n\nCreate one app. for both Android and iOS (Apple) using one computer alorithm for both apps. You'll need Visual Studio Code and Android Studio to get started:\n\nhttps://code.visualstudio.com/download\n\nhttps://developer.android.com/studio\n\nIf you want to see how your app. will look on iOS (Apple) devices, you'll need Xcode from the Apple app. store:\n\nhttps://developer.apple.com/xcode/\n\nTo run the Xcode app, you'll need a fairly new Apple computer.\n\nhttps://reactnative.dev/docs/environment-setup\n\nhttps://reactnative.dev/docs/components-and-apis\n\nhttps://reactnative.dev/docs/intro-react\n\nCheck out App.js here in the code files for the computer algorithm code.\n\n## Storing Projects\n\nWhen you complete a React Native project, you should keep it on your storage device for a little while. There are multiple instances where one project will be the basis of another project. The Udemy course keeps building on the projects, so you definitely need to keep those around until you are done with that project in the course.\n\nBUT -- React Native projects are huge. There is a folder, node_modules, that takes up most of the space. If you keep every project you create in this course, you would need at least 20GB of space, probably more. How can you manage this terrible drain on your storage?\n\nThat node_modules folder is automatically added when you create a new project. Once you are done with the project, you can delete that folder, node_modules, and the size of your project will shrink dramatically.\n\nThis does not destroy the project. If you find you need to run an old project again, which no longer has its node_modules folder, open it in Visual Studio Code, open a terminal, and type \"npm install\". This will load the node_modules folder again, and the project is whole and ready to run.\n\nNote that when you delete that folder, it takes a noticeable amount of time, far more than it takes to reload it.\n\nA good practice for course maintenance is to keep the project in its full state until you are sure you won't be using it in the next few days, then delete the node_modules folder.\n\n== We're Using GitHub Under Protest ==\n\nThis project is currently hosted on GitHub.  This is not ideal; GitHub is a\nproprietary, trade-secret system that is not Free and Open Souce Software\n(FOSS).  We are deeply concerned about using a proprietary system like GitHub\nto develop our FOSS project. I have a [website](https://bellKevin.me) where the\nproject contributors are actively discussing how we can move away from GitHub\nin the long term.  We urge you to read about the [Give up GitHub](https://GiveUpGitHub.org) campaign \nfrom [the Software Freedom Conservancy](https://sfconservancy.org) to understand some of the reasons why GitHub is not \na good place to host FOSS projects.\n\nIf you are a contributor who personally has already quit using GitHub, please\nemail me at **bellKevin@pm.me** for how to send us contributions without\nusing GitHub directly.\n\nAny use of this project's code by GitHub Copilot, past or present, is done\nwithout our permission.  We do not consent to GitHub's use of this project's\ncode in Copilot.\n\n![Logo of the GiveUpGitHub campaign](https://sfconservancy.org/img/GiveUpGitHub.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbell-kevin%2Fusereducerregistrationvalidation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbell-kevin%2Fusereducerregistrationvalidation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbell-kevin%2Fusereducerregistrationvalidation/lists"}