{"id":14015684,"url":"https://github.com/omochi/swift-react","last_synced_at":"2025-07-20T14:33:46.110Z","repository":{"id":236058212,"uuid":"779585771","full_name":"omochi/swift-react","owner":"omochi","description":"Scratch React implementation on Swift for Wasm","archived":false,"fork":false,"pushed_at":"2024-06-08T12:43:44.000Z","size":335,"stargazers_count":31,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T05:52:15.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/omochi.png","metadata":{"files":{"readme":"README.ja.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-30T08:16:12.000Z","updated_at":"2025-03-18T21:29:20.000Z","dependencies_parsed_at":"2024-08-11T03:02:39.907Z","dependency_job_id":"1fedeb88-1128-4687-b0f1-1d5a01b648d5","html_url":"https://github.com/omochi/swift-react","commit_stats":null,"previous_names":["omochi/swift-react"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omochi%2Fswift-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omochi%2Fswift-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omochi%2Fswift-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omochi%2Fswift-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omochi","download_url":"https://codeload.github.com/omochi/swift-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161131,"owners_count":21057552,"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":[],"created_at":"2024-08-11T03:01:21.790Z","updated_at":"2025-04-10T04:42:17.091Z","avatar_url":"https://github.com/omochi.png","language":"Swift","readme":"# Swift React\n\n**Swift React** は [React](https://ja.react.dev) を Swift で新規に実装したライブラリです。これを使って Swift でインタラクティブなウェブサイトを実装しましょう。\n\n## 概要\n\n**Swift React** は React と同じように使えることを目指しています。ただし API は Swift らしい仕様にしています。以下は Hello world を表示する実装例です。\n\n```swift\nimport React\n\nstruct App: Component {\n    func render() -\u003e Node {\n        div {\n            \"Hello World\"\n        }\n    }\n}\n```\n\n### 対象環境\n\nSwift for Wasm を対象にしています。他の Swift 環境はサポートしていません。\n\nウェブブラウザ上での実行を対象にしています。他の Wasm 実行環境はサポートしていません。\n\n## 利用方法\n\nSwift Packageから依存ライブラリとして追加してください。\n\n```swift\n.package(url: \"https://github.com/omochi/swift-react\", from: \"0.2.0\")\n```\n\n[JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit) に依存しているので、ウェブブラウザ上でWASMバイナリをロードする際に、 JavaScriptKit の JavaScript ランタイムライブラリをインポートする必要があります。詳しくは [環境構築方法](./docs/configure.ja.md)を参照してください。\n\n## 文書\n\n- [環境構築方法](./docs/configure.ja.md)\n- [APIマニュアル](./docs/api.md)\n\n### 開発者向け\n\n- [Testing](./docs/testing.md)\n\n## ビルド可能なサンプル\n\nブラウザ上で動作するビルド可能なサンプルとして、以下の2つのサブプロジェクトがあります。\n\n- [CartonExample](./CartonExample): Carton を利用した構成例です。最初に試してみる時はこれがオススメです。\n- [BrowserTests](./BrowserTests): 手動で構築した例です。複雑なカスタマイズをする時の参考になるでしょう。\n\n## 事例紹介\n\nSwift React を利用したウェブサイトを紹介します。\n\n- [Swift String Counter](https://omochi.github.io/swift-string-counter-web) ([GitHub](https://github.com/omochi/swift-string-counter-web)): 文字を数えるウェブページです。\n","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomochi%2Fswift-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomochi%2Fswift-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomochi%2Fswift-react/lists"}