{"id":22341779,"url":"https://github.com/weaponsforge/react-basic","last_synced_at":"2025-06-10T11:35:06.991Z","repository":{"id":51656247,"uuid":"228980556","full_name":"weaponsforge/react-basic","owner":"weaponsforge","description":"Testing adding react component on an existing website","archived":false,"fork":false,"pushed_at":"2022-12-11T17:46:07.000Z","size":466,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T09:37:17.058Z","etag":null,"topics":["experiments","react"],"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/weaponsforge.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":"2019-12-19T05:18:44.000Z","updated_at":"2023-12-18T08:58:08.000Z","dependencies_parsed_at":"2023-01-27T04:15:51.118Z","dependency_job_id":null,"html_url":"https://github.com/weaponsforge/react-basic","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/weaponsforge%2Freact-basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Freact-basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Freact-basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Freact-basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaponsforge","download_url":"https://codeload.github.com/weaponsforge/react-basic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Freact-basic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259067695,"owners_count":22800377,"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":["experiments","react"],"created_at":"2024-12-04T08:08:12.678Z","updated_at":"2025-06-10T11:35:06.949Z","avatar_url":"https://github.com/weaponsforge.png","language":"JavaScript","readme":"# react-basic\r\n\r\n\u003e Testing adding react component on an existing website.\r\n\r\n\r\n\r\n### Prerequisites\r\n\r\n1. NodeJS\r\n\t- version 10.16.3 was used for this project\r\n2. Windows 10 64-bit OS\r\n\r\n\r\n\r\n## Content\r\n\r\n\r\n### React Project Files\r\n\r\nReferencing from **/public** directory.\r\n\r\n1. **index.html**, **like\\_button.js**\r\n\t- basic html page, includes **React library** from unkpg\r\n\t- loads React component using Javascript\r\n\r\n2. **jsx.html**, **like\\_button\\_jsx.js**\r\n\t- basic html page, includes **React library** and **babel** from unkpg\r\n\t- loads React component using JSX\r\n\r\n\r\n\r\n## Usage\r\n\r\n1. Clone this repository.  \r\n`git clone https://github.com/weaponsforge/react-basic.git`\r\n\r\n2. Install dependencies.  \r\n`npm install`\r\n\r\n3. Run the server.  \r\n\t`npm run start`  to start the basic express server that loads static (front-end) files from the **/public** directory. *(Required)*\r\n\r\n4. Open a web browser to  \r\n\t- Run the react app using regular javascript syntax):  \r\n`http://localhost:3000` \r\n\t- Runs the react app using JSX syntax, loading babel from unpkg:  \r\n`http://localhost:3000/jsx_unpkg.html` \r\n\t- Runs the react app using JSX syntax, loading babel from localhost:  \r\n\t\t- Install babel in your project's root directory (if its not yet installed):  \r\n\t\t\t`npm install babel-cli@6 babel-preset-react-app@3`\r\n      - Run babel, create/edit react components from **/src** as needed:  \r\n\t\t\t`npx babel --watch src --out-dir ./public/jsx --presets react-app/prod`  \r\n      - Load the react app(s):  \r\n\t\t\t- `http://localhost:3000/jsx_local.html`\r\n\t\t\t- `http://localhost:3000/children`\r\n\t\t\t- `http://localhost:3000/clock`\r\n\t\t\t- `http://localhost:3000/conditionals`\r\n\t\t\t- `http://localhost:3000/eventhandler`\r\n\t\t\t- `http://localhost:3000/lists`\r\n\r\n\r\n@weaponsforge  \r\n20191219  \r\n20200112\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Freact-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaponsforge%2Freact-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Freact-basic/lists"}