{"id":15011431,"url":"https://github.com/ashirbadgudu/bun-react-app","last_synced_at":"2025-04-12T03:31:22.572Z","repository":{"id":45766798,"uuid":"514091502","full_name":"AshirbadGudu/bun-react-app","owner":"AshirbadGudu","description":"Create a react app with bun.js","archived":false,"fork":false,"pushed_at":"2023-09-13T10:44:49.000Z","size":163,"stargazers_count":22,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T23:23:20.815Z","etag":null,"topics":["bunjs","create-react-app","hacktoberfest2022","javascript","reactjs"],"latest_commit_sha":null,"homepage":"https://dev.to/ashirbadgudu/create-a-react-app-with-bun-125o","language":"HTML","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/AshirbadGudu.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":"2022-07-15T01:03:20.000Z","updated_at":"2024-07-28T12:31:19.000Z","dependencies_parsed_at":"2022-09-03T04:31:59.353Z","dependency_job_id":null,"html_url":"https://github.com/AshirbadGudu/bun-react-app","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/AshirbadGudu%2Fbun-react-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshirbadGudu%2Fbun-react-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshirbadGudu%2Fbun-react-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshirbadGudu%2Fbun-react-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AshirbadGudu","download_url":"https://codeload.github.com/AshirbadGudu/bun-react-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512618,"owners_count":21116644,"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":["bunjs","create-react-app","hacktoberfest2022","javascript","reactjs"],"created_at":"2024-09-24T19:41:05.439Z","updated_at":"2025-04-12T03:31:22.114Z","avatar_url":"https://github.com/AshirbadGudu.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React with Bun runtime\n\n## Want to use bun for your next react projects?\n\n---\n\n### Install `bun`\n\nFirst run the following command to check `bun` is installed or not\n\n```sh\nbun -v\n```\n\nIf you don't have `bun` installed then run the following command to install `bun`\n\n```sh\ncurl https://bun.sh/install | bash\n```\n\n### Create a react app\n\nNow run the following command to create a react app\n\n```sh\nbun create react [your-app-name]\n```\n\nIt will create a new directory with the name of your app. To start the app run the following command\n\n```sh\ncd your-app-name\nbun dev\n```\n\n### Build production bundle for react app\n\nBy default `bun` does not ship with `react-scripts` so you need to install it first.\n\n```sh\nbun a react-scripts -d\n```\n\nHere we install it as a dev dependency.\n\nThen run the following command to build the production bundle\n\n```sh\nbun react-scripts build\n```\n\nWhen you run the command above it will build the production bundle and it will be stored in the `build` directory.\n\n### Adding `scripts` to your package.json\n\nWe can add the following scripts to our package.json file\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"bun dev\",\n    \"build\": \"react-scripts build\"\n  }\n}\n```\n\nNow we can run the following command to start the app\n\n```sh\nbun start\n```\n\nAnd we can run the following command to build the production bundle\n\n```sh\nbun run build\n```\n\n### Bonus:\n\n\u003e By default `bun` creates react app with javascript but we can easily use typescript by changing the file extension from `.jsx` to `.tsx`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashirbadgudu%2Fbun-react-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashirbadgudu%2Fbun-react-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashirbadgudu%2Fbun-react-app/lists"}