{"id":20865656,"url":"https://github.com/adeelibr/react-hooks-demo","last_synced_at":"2025-05-12T10:32:23.209Z","repository":{"id":44593772,"uuid":"155092092","full_name":"adeelibr/react-hooks-demo","owner":"adeelibr","description":"A react hooks demo, inspired by Dan Abramov Demo in React Conf 2018","archived":false,"fork":false,"pushed_at":"2019-10-15T21:46:26.000Z","size":314,"stargazers_count":49,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T05:51:14.447Z","etag":null,"topics":["react","react-context","react-hooks","usecontext","useeffect","usestate"],"latest_commit_sha":null,"homepage":null,"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/adeelibr.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":"2018-10-28T16:35:32.000Z","updated_at":"2024-06-11T04:55:07.000Z","dependencies_parsed_at":"2022-09-15T15:50:43.648Z","dependency_job_id":null,"html_url":"https://github.com/adeelibr/react-hooks-demo","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/adeelibr%2Freact-hooks-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeelibr%2Freact-hooks-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeelibr%2Freact-hooks-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeelibr%2Freact-hooks-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adeelibr","download_url":"https://codeload.github.com/adeelibr/react-hooks-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253720088,"owners_count":21952964,"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-context","react-hooks","usecontext","useeffect","usestate"],"created_at":"2024-11-18T05:50:19.378Z","updated_at":"2025-05-12T10:32:22.942Z","avatar_url":"https://github.com/adeelibr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documentation\n\n### Starter Kit\nThe demo uses starter kit https://github.com/adeelibr/react-starter-kit\n\n### Demo Includes\n* Example of useState\n* Example of useEffect\n* Example of useContext\n* Example of custom hooks\n  * custom hook useWindowWidth \n  * custom hook useDocumentTitle \n  * custom hook useFormInput \n* Example of useReducer\n* Examples of useSpring (react-spring) hooks\n  * Progress bar example\n  * Fade example\n\n### How to run\n\n```\n$ yarn \n$ yarn start // development\n$ yarn build // production build\n```\n\n### How to use\n\nIn `src/index.js`\n\nThere is an object called `const VISIBLE = {};` with a list of all examples, all you have to do is, to see a particular example. Let's say you want to see `react-spring` examples of hooks, do the following in your `App` state\n```\nstate = {\n    isVisible: [\n      VISIBLE.IS_REACT_SPRING_1_VISIBLE,\n      VISIBLE.IS_REACT_SPRING_2_VISIBLE,\n    ],\n};\n```\nAnd that's pretty much it, just add a `VISIBLE.SOME_EXMAPLE` to your `isVisible` state array, your app will hot reload with the new UI information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadeelibr%2Freact-hooks-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadeelibr%2Freact-hooks-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadeelibr%2Freact-hooks-demo/lists"}