{"id":21250730,"url":"https://github.com/fatahpratam/tutorial-react-component","last_synced_at":"2026-04-09T01:31:30.697Z","repository":{"id":263800615,"uuid":"890770337","full_name":"fatahpratam/tutorial-react-component","owner":"fatahpratam","description":"Created for documenting my progress for Hitesh's React YouTube tutorial. (Chapter 6) ","archived":false,"fork":false,"pushed_at":"2024-11-23T13:50:38.000Z","size":162,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T05:24:13.730Z","etag":null,"topics":["eslint","frontend","javascript","jsx","react","vite","web-app","web-development"],"latest_commit_sha":null,"homepage":"https://fatahpratam.github.io/tutorial-react-component/","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/fatahpratam.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":"2024-11-19T06:33:38.000Z","updated_at":"2024-11-23T13:50:41.000Z","dependencies_parsed_at":"2025-03-15T05:23:51.706Z","dependency_job_id":"802b285d-4721-4c26-8158-e161b6b4690a","html_url":"https://github.com/fatahpratam/tutorial-react-component","commit_stats":null,"previous_names":["fatahpratam/tutorial-react-component"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fatahpratam/tutorial-react-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatahpratam%2Ftutorial-react-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatahpratam%2Ftutorial-react-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatahpratam%2Ftutorial-react-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatahpratam%2Ftutorial-react-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fatahpratam","download_url":"https://codeload.github.com/fatahpratam/tutorial-react-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatahpratam%2Ftutorial-react-component/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["eslint","frontend","javascript","jsx","react","vite","web-app","web-development"],"created_at":"2024-11-21T03:38:34.789Z","updated_at":"2026-04-09T01:31:30.678Z","avatar_url":"https://github.com/fatahpratam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chapter 6: Props, Tailwind, dan Component\n\n## GitHub Pages\nLink untuk deployment: [Props Component](https://fatahpratam.github.io/tutorial-react-component/)\n\n## Youtube Tutorial\n- Link: [Full Stack React Developer Course with Appwrite](https://www.youtube.com/watch?v=Bvwq_S0n2pk)\n- Creator: [HiteshCodeLab](https://www.youtube.com/@HiteshCodeLab)\n\n## Detail lebih lanjut tentang jsx\n- Karena beberapa keyword digunakan oleh JavaScript, beberapa attribute html dikonversi menjadi berikut:\n- `class` -\u003e `className`\n- `for` -\u003e `htmlFor`\n- Untuk menggunakan array dan object sebagai component argument, dapat menggunakan {}. Contoh:\n```jsx\n\u003cApp myArray={[1, 2, 3]} /\u003e\n```\n\n## Instalasi Tailwind\n- `npm install -D tailwindcss postcss autoprefixer`\n- `npx tailwindcss init -p`\n- Tambahkan jalur ke semua berkas templat Anda di berkas `tailwind.config.js`.\n- Tambahkan arahan @tailwind untuk setiap layer Tailwind ke berkas `./src/index.css` Anda.\n\n## Component\n- Component dapat didefinisikan sebagai sebuah fungsi yang diawali dengan huruf kapital yang mengembalikan composite component atau host component lainnya.\n- Component yang tidak memiliki parameter dinamakan dumb component.\n- Component membuat sebuah UI dapat digunakan berulang-ulang.\n\n## Props\n- Nilainya berasal dari parameter component\n- Bentuknya key dan value\n- Untuk memberikan argumen pada component, cukup dengan memberikan atribute saat memanggil component-nya\n- Props dapat diberikan default value\n- Dapat destructure props langsung di dalam parameter\n- Contoh pendeklarasikan component dengan props:\n```js\nfunction App(props) {\n  return (\n    \u003cp\u003eString: {props.str}\u003c/p\u003e\n  )\n}\n```\n- Contoh pemanggilan component dengan props:\n\u003cApp str=\"test\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatahpratam%2Ftutorial-react-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatahpratam%2Ftutorial-react-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatahpratam%2Ftutorial-react-component/lists"}