{"id":15018431,"url":"https://github.com/nativescript/capacitor-react-demo","last_synced_at":"2026-01-19T02:02:22.887Z","repository":{"id":141977434,"uuid":"343303118","full_name":"NativeScript/capacitor-react-demo","owner":"NativeScript","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-01T06:01:20.000Z","size":668,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-19T00:44:22.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/NativeScript.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}},"created_at":"2021-03-01T05:40:08.000Z","updated_at":"2025-01-22T04:47:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6759fb3-64f7-4de2-a344-0d12e16dec9a","html_url":"https://github.com/NativeScript/capacitor-react-demo","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"db9d099837ce0816e74ab68a22848dcaf2f53e59"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NativeScript/capacitor-react-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fcapacitor-react-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fcapacitor-react-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fcapacitor-react-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fcapacitor-react-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeScript","download_url":"https://codeload.github.com/NativeScript/capacitor-react-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fcapacitor-react-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28557784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-09-24T19:51:57.463Z","updated_at":"2026-01-19T02:02:22.869Z","avatar_url":"https://github.com/NativeScript.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A simple React Ionic demo with @nativescript/capacitor example wired.\n\nTry it out:\n```\nnpm install\nnpm run build:mobile\nnpx cap sync\nnpx cap run ios\n// or...\nnpx cap run android\n```\n\n## How this demo was created\n\n```\nnpm install -g @ionic/cli\nionic start\n\u003e React\n\u003e sidedrawer\n\nnpm install @capacitor/cli@next @capacitor/core@next @capacitor/android@next @capacitor/ios@next\n\nnpx cap init\n\n// this creates the build directory in order to add platforms\nnpm run build \n\nnpx cap add android\nnpx cap add ios\n\n// Now ready for NativeScript \nnpm i @nativescript/capacitor --save\n\n\n```\n\nNow add add bindings/wirings in any component, ie: ExploreContainer.tsx:\n```\nimport './ExploreContainer.css';\nimport { native } from '@nativescript/capacitor';\n\nconst ExploreContainer: React.FC\u003cContainerProps\u003e = ({ name }) =\u003e {\n  function handleClick(e: React.MouseEvent\u003cHTMLAnchorElement, MouseEvent\u003e) {\n    e.preventDefault();\n    native.openNativeModalView();\n  }\n  return (\n    \u003cdiv className=\"container\"\u003e\n      \u003cstrong\u003e{name}\u003c/strong\u003e\n      \u003cp className=\"ion-padding-top\"\u003e\n        \u003ca onClick={handleClick}\u003eOpen Native Modal\u003c/a\u003e\n      \u003c/p\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default ExploreContainer;\n```\n\nNow build for mobile (builds react and nativescript together) and prepare to run:\n```\nnpm run build:mobile\n\n// Now sync\nnpx cap sync\n\n// Now just run the app:\nnpx cap run ios\n// or...\nnpx cap run android\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fcapacitor-react-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript%2Fcapacitor-react-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fcapacitor-react-demo/lists"}