{"id":19598522,"url":"https://github.com/kaplanh/reactrandomuser","last_synced_at":"2025-06-25T08:39:29.000Z","repository":{"id":222751896,"uuid":"758283895","full_name":"kaplanh/ReactRandomUser","owner":"kaplanh","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-16T02:33:49.000Z","size":909,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T15:16:09.002Z","etag":null,"topics":["bootstrap5","conditional-rendering","fetch-api","internationalisation","internationalization","optional-chaining","react","react-events","semantic-commits","useeffect-hook","usestate-hook"],"latest_commit_sha":null,"homepage":"https://random-user-with-react-v1.netlify.app/","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/kaplanh.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}},"created_at":"2024-02-16T01:30:40.000Z","updated_at":"2024-02-16T02:38:41.000Z","dependencies_parsed_at":"2024-02-16T02:42:18.813Z","dependency_job_id":null,"html_url":"https://github.com/kaplanh/ReactRandomUser","commit_stats":null,"previous_names":["kaplanh/reactrandomuser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kaplanh/ReactRandomUser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanh%2FReactRandomUser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanh%2FReactRandomUser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanh%2FReactRandomUser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanh%2FReactRandomUser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaplanh","download_url":"https://codeload.github.com/kaplanh/ReactRandomUser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanh%2FReactRandomUser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261837881,"owners_count":23217526,"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":["bootstrap5","conditional-rendering","fetch-api","internationalisation","internationalization","optional-chaining","react","react-events","semantic-commits","useeffect-hook","usestate-hook"],"created_at":"2024-11-11T09:06:34.228Z","updated_at":"2025-06-25T08:39:28.976Z","avatar_url":"https://github.com/kaplanh.png","language":"JavaScript","readme":"# React Random User\n\n[:point_right: Click here to see on browser](https://random-user-with-react-v1.netlify.app/)\n\n![random user_with react](https://github.com/kaplanh/ReactRandomUser/assets/101884444/3ecc4597-20e1-4bbb-b326-7b50bdeec34f)\n\n---\n\n| **What's used in this app ?**                                                           | **How use third party libraries**          | **Author**                                                                       |\n| -------------------------------------------------------------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------- |\n| [useEffect() Hook](https://react.dev/reference/react/useEffect) |                 | [Take a look at my portfolio](https://kaplanh.github.io/Portfolio_with_CssFlex/) |\n| [useState() Hook](https://react.dev/learn#using-hooks)                                  |                                 | [Visit me on Linkedin](https://www.linkedin.com/in/kaplan-h/)                    |\n| [Optional chaining ?.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining)                           |                                            |                    |\n| [ECMAScript Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)                           |                                            |                    |\n| [react-events](https://react.dev/learn#responding-to-events)                           |                                            |                    |\n| [React-Conditional rendering](https://react.dev/learn#conditional-rendering)            |                                            |     |                                      \n| [React-Bootstrap](https://react-bootstrap.netlify.app/)                                 | npm i / yarn add react-bootstrap bootstrap |                                                                        |\n| [Semantic-Commits](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) |                                            |                                                                        |\n| [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) |                                            |                                                                        |\n| Deploy with [Netlify](https://app.netlify.com/teams/kaplanh/sites)                                      |                                            |                                                       |\n|API [randomuser.me](https://randomuser.me/api/)                                      |                                            |                                                       |\n\n---\n\n## How To Run This Project 🚀\n\n\u003cbr/\u003e\n\n### 💻 Install React 👇\n\n```bash\nyarn create react-app .  or npx create-react-app .\n```\n\n### 💻 Install Sass 👇\n\n```bash\nyarn add sass  or npm i sass\n```\n\n## 🔴 Delete these files and delete the imports👇\n\n    - App.test.js\n    - reportWebVitals.js\n    - setupTests.js\n    - favicon.ico\n    - logo192.png\n    - logo512.png\n    - manifest.json\n    - robots.txt\n\n### 💻 Start the project 👇\n\n```bash\nyarn start or npm start\n```\n\nOR\n\n-   \u003cstrong\u003eClone the Repo\u003c/strong\u003e\n\n    ```sh\n    git clone\n    ```\n\n-   \u003cstrong\u003eInstall NPM packages\u003c/strong\u003e\n\n    ```sh\n    npm install or yarn\n    ```\n\n-   \u003cstrong\u003eRun the project\u003c/strong\u003e\n\n    ```sh\n    npm start or yarn start\n    ```\n\n-   \u003cstrong\u003eOpen the project on your browser\u003c/strong\u003e\n\n    ```sh\n    http://localhost:3000/\n    ```\n\n-   ### \u003cstrong\u003eEnjoy! 🎉\u003c/strong\u003e\n\n---\n\n## Project Skeleton\n\n```\n Appointment App (folder)\n|\n|----public (folder)\n│     └── index.html\n|----src (folder)\n|    |--- components (folder)\n│    │       ├── User.jsx\n│    │\n|    |--- assets (folder)\n│    │       ├── email.svg\n│    │       ├── location.svg\n│    │       ├── phone.svg\n│    │\n│    ├--- App.js\n│    |--- index.js\n│\n│\n|-- .gitignore\n|── package-lock.json\n├── package.json\n|── README.md\n|── yarn.lock\n\n\n```\n\n---\n\n### At the end of the project, the following topics are to be covered;\n\n- useEffect() hook\n\n ```jsx\n        // src/components/User.jsx\n\n           const [loading, isLoading] = useState(true);\n           const [userData, setUserData] = useState(\"\");\n\n\n    \n             const getUser = () =\u003e {\n            fetch(\"https://randomuser.me/api/\")\n                .then((res) =\u003e res.json())\n                .then((data) =\u003e setUserData(data.results[0]))\n                .catch((err) =\u003e console.log(err));\n            isLoading(false);\n        };\n    \n         useEffect(() =\u003e {\n            getUser();\n        }, []);\n\n     \u003cbutton onClick={getUser} className=\"btn btn-success\"\u003e\n                    New User\n                \u003c/button\u003e\n\n```\n\n- conditional rendering + cconditional Css\n\n     ```jsx\n      if (loading) {\n        return (\n            \u003cdiv className=\"d-flex justify-content-center align-items-center\" style={{ height: \"100vh\" }}\u003e\n                \u003ch1 className=\"text-danger\"\u003e\n                    Loading...\n                \u003c/h1\u003e\n            \u003c/div\u003e\n        );\n    }\n\n   return (\n        \u003cdiv\u003e\n      \u003cdiv/\u003e\n      )\n  ```\n\n- Optional Chaining?.\n\n```jsx\n         {userData?.location?.city}- {userData?.location?.country}\n```\n\n- ECMAScript Internationalization API \n    ```jsx\n       {new Date(userData?.dob?.date).toLocaleDateString(\"de-DE\")}\n    ```\n\n- Semantic Commit Messages\n    See how a minor change to your commit message style can make you a better programmer.\n\n    Format: \u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n\n    \u003cscope\u003e is optional\n\n    -   Example\n\n ```\n                feat: add hat wobble\n        ^--^  ^------------^\n        |     |\n        |     +-\u003e Summary in present tense.\n        |\n        +-------\u003e Type: chore, docs, feat, fix, refactor, style, or test.\n    \n```\n - More Examples:\n    -   `feat`: (new feature for the user, not a new feature for build script)\n    -   `fix`: (bug fix for the user, not a fix to a build script)\n    -   `docs`: (changes to the documentation)\n    -   `style`: (formatting, missing semi-colons, etc; no production code change)\n    -   `refactor`: (refactoring production code, eg. renaming a variable)\n    -   `test`: (adding missing tests, refactoring tests; no production code change)\n    -   `chore`: (updating grunt tasks etc; no production code change)\n\n\n---\n\n## Feedback and Collaboration\n\nI value your feedback and suggestions. If you have any comments, questions, or ideas for improvement regarding this project or any of my other projects, please don't hesitate to reach out.\nI'm always open to collaboration and welcome the opportunity to work on exciting projects together.\nThank you for visiting my project. I hope you have a wonderful experience exploring it, and I look forward to connecting with you soon!\n\n\u003cp align=\"center\"\u003e ⌛\u003cstrong\u003e Happy Coding \u003c/strong\u003e ✍ \u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaplanh%2Freactrandomuser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaplanh%2Freactrandomuser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaplanh%2Freactrandomuser/lists"}