{"id":18614956,"url":"https://github.com/andrewjbateman/ionic-react-scratchpad","last_synced_at":"2026-04-16T18:07:51.619Z","repository":{"id":52819268,"uuid":"253185312","full_name":"AndrewJBateman/ionic-react-scratchpad","owner":"AndrewJBateman","description":":clipboard: App to calculate the users Body Mass Index (BMI) using inputs of height and weight. Created using the Ionic 5 framework with React]. Initially Academind: Youtube video: Ionic + React - Tutorial for Beginners 2020 code but with customisations to code and styling.","archived":false,"fork":false,"pushed_at":"2025-04-24T18:35:19.000Z","size":871,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T01:34:27.750Z","etag":null,"topics":["academind","ionic","ionic5","react","tutorial-code","typescript3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewJBateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-05T08:09:07.000Z","updated_at":"2022-01-16T22:44:17.000Z","dependencies_parsed_at":"2022-08-17T15:31:29.873Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/ionic-react-scratchpad","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/ionic-react-scratchpad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-react-scratchpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-react-scratchpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-react-scratchpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-react-scratchpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/ionic-react-scratchpad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-react-scratchpad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31897925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T17:33:00.867Z","status":"ssl_error","status_checked_at":"2026-04-16T17:32:57.401Z","response_time":69,"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":["academind","ionic","ionic5","react","tutorial-code","typescript3"],"created_at":"2024-11-07T03:27:38.705Z","updated_at":"2026-04-16T18:07:51.550Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","readme":"# :zap: Ionic React Scratchpad\n\n* App to calculate the users Body Mass Index (BMI) using inputs of height and weight. Created using the [Ionic 5 framework](https://ionicframework.com/docs) with [React](https://reactjs.org/)].\n* Initially Academind: Youtube video: [Ionic + React - Tutorial for Beginners 2020](https://www.youtube.com/watch?v=_03VKmdrxV8) code but with customisations to code and styling.\n\n## :page_facing_up: Table of contents\n\n* [:zap: Ionic React Scratchpad](#zap-ionic-react-scratchpad)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-do list](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* App created using Ionic CLI v5\n\n## :camera: Screenshots\n\n![screen print](./img/bmi.png)\n\n## :signal_strength: Technologies\n\n* [Ionic v5](https://ionicframework.com/) framework\n* [React v17](https://reactjs.org/) library\n\n## :floppy_disk: Setup\n\n* Load dependencies using `npm i`,\n* To start the server on _localhost://8100_ type: 'ionic serve'\n\n## :computer: Code Examples\n\n* function to calculate BMI from user inputs for height \u0026 weight\n\n```javascript\nconst calculateBMI = () =\u003e {\n  const enteredWeight = weightInputRef.current!.value;\n  const enteredHeight = heightInputRef.current!.value;\n\n  if (\n    !enteredHeight ||\n    !enteredWeight ||\n    +enteredHeight \u003c= 0 ||\n    +enteredWeight \u003c= 0\n  ) {\n    setError(\"Please enter a valid number\");\n    return;\n  }\n\n  const weightConversionFactor = calcUnits === 'ftlbs' ? 2.20 : 1;\n  const heightConversionFactor = calcUnits === 'ftlbs' ? 3.28 : 1;\n\n  const weight = +enteredWeight / weightConversionFactor;\n  const height = +enteredHeight / heightConversionFactor;\n\n  setCalculatedBmi(weight / (height * height));\n};\n```\n\n## :cool: Features\n\n* ion cards are responsive so app looks good on PC or mobile screen\n\n## :clipboard: Status \u0026 To-do list\n\n* Status: working. Updated april 2021. Minor error: result card does not disappear when reset button is pressed\n* To-do: Fix reset and add functionality\n\n## :clap: Inspiration\n\n* Academind: Youtube video: [Ionic + React - Tutorial for Beginners 2020](https://www.youtube.com/watch?v=_03VKmdrxV8)\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fionic-react-scratchpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fionic-react-scratchpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fionic-react-scratchpad/lists"}