{"id":16333035,"url":"https://github.com/davidyslu/Booking-Demo","last_synced_at":"2025-08-29T11:30:47.904Z","repository":{"id":93933980,"uuid":"508917122","full_name":"yungshenglu/Booking-Demo","owner":"yungshenglu","description":"Simple demo of room allocation in React 17 ! 🚀","archived":false,"fork":false,"pushed_at":"2022-07-05T03:29:31.000Z","size":829,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T23:09:21.598Z","etag":null,"topics":["babel","emotion","react","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yungshenglu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2022-06-30T03:13:43.000Z","updated_at":"2022-07-04T03:31:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"a089d177-c3c9-4e6a-a813-3da090de833d","html_url":"https://github.com/yungshenglu/Booking-Demo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungshenglu%2FBooking-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungshenglu%2FBooking-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungshenglu%2FBooking-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungshenglu%2FBooking-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yungshenglu","download_url":"https://codeload.github.com/yungshenglu/Booking-Demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231364149,"owners_count":18365408,"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":["babel","emotion","react","webpack"],"created_at":"2024-10-10T23:34:08.657Z","updated_at":"2025-08-29T11:30:41.948Z","avatar_url":"https://github.com/yungshenglu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Booking Demo in React\n\n![](assets/img/Demo.png)\n\nThis repository is a simple demo for implementing booking function in React 17. 🚀\n\n\u003e HINT: If you have any questions, please feel free to ask me.\n\n---\n\n## Description\n\n### Execution\n\n1. To run this demo, you need to clone the project first.\n  ```bash\n  $ git clone https://github.com/yungshenglu/Booking-Demo\n  ```\n2. After cloning, change the your current directory into the repository and setup the project\n   ```bash\n   $ cd Booking-Demo/ \u0026 yarn install\n   ```\n   - The command `yarn install` will install some necessary packages for this project\n   - It will take few second for running above command\n3. Compiles and hot-reloads for development\n   ```bash\n   $ yarn start\n   ```\n   - It will take few second for running above command\n   - You won't get any error messages if running successful\n4. Congratulation! you can open your browser to `http://localhost:9527` and see our Booking-Demo\n\n---\n\n## Implementation\n\n### Components\n\n- All components are implemented without any third-party UI library.\n- The styles of components are implemented with [Emotion](https://emotion.sh/docs/introduction) which is a library designed for writing css styles with JavaScript. In short, it is an styled-component design.\n\n### Long-Press Function in Button\n\n- The long-press function is implemented via `setInterval` to detect whether the action of clicking button in long-press in `CustomButton`.\n  - You can adjust the interval of long-press arbitrary.\n- To implement long-press action, we also need these **synthetic events** as follow in React:\n  - `onMouseDown`\n  - `onMouseUp`\n  - `onMouseLeave`\n  - `onTouchStart`\n  - `onTouchEnd`\n\n### Factory Design\n\n![](assets/img/Factory-Design.png)\n\n- Data: `/src/constants/RoomFormInfo.js`\n- Components: `/src/components/`\n- Factory: `/src/containers/FormFactory.js`\n\n---\n\n## Contributor\n\n\u003e NOTICE: You can follow the contributing process [CONTRIBUTING.md](CONTRIBUTING.md) to join me. I am very welcome for any issue!\n\n- [David Lu](https://github.com/yungshenglu)\n\n---\n\n## License\n\n[WTFPL](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidyslu%2FBooking-Demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidyslu%2FBooking-Demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidyslu%2FBooking-Demo/lists"}