{"id":18782868,"url":"https://github.com/rescript-react-native/inappbrowser","last_synced_at":"2026-05-05T19:31:12.840Z","repository":{"id":40706777,"uuid":"327555437","full_name":"rescript-react-native/inappbrowser","owner":"rescript-react-native","description":"ReScript bindings for react-native-inappbrowser-reborn","archived":false,"fork":false,"pushed_at":"2023-04-22T06:58:04.000Z","size":126,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-19T08:41:54.810Z","etag":null,"topics":["in-app-browser","inappbrowser","react","react-native","rescript","rescript-react","rescript-react-native"],"latest_commit_sha":null,"homepage":"","language":"ReScript","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/rescript-react-native.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-01-07T08:54:19.000Z","updated_at":"2025-05-23T17:23:47.000Z","dependencies_parsed_at":"2023-07-18T14:31:23.934Z","dependency_job_id":null,"html_url":"https://github.com/rescript-react-native/inappbrowser","commit_stats":null,"previous_names":["dimapaloskin/inappbrowser"],"tags_count":2,"template":false,"template_full_name":"rescript-react-native/__template__","purl":"pkg:github/rescript-react-native/inappbrowser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Finappbrowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Finappbrowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Finappbrowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Finappbrowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rescript-react-native","download_url":"https://codeload.github.com/rescript-react-native/inappbrowser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Finappbrowser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32664725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["in-app-browser","inappbrowser","react","react-native","rescript","rescript-react","rescript-react-native"],"created_at":"2024-11-07T20:37:19.259Z","updated_at":"2026-05-05T19:31:12.824Z","avatar_url":"https://github.com/rescript-react-native.png","language":"ReScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@rescript-react-native/inappbrowser`\n\n[![Build Status](https://github.com/rescript-react-native/inappbrowser/workflows/Build/badge.svg)](https://github.com/rescript-react-native/inappbrowser/actions)\n[![Version](https://img.shields.io/npm/v/@rescript-react-native/inappbrowser.svg)](https://www.npmjs.com/@rescript-react-native/inappbrowser)\n[![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f\u0026label=ReScript%20Forum\u0026server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/)\n\n[ReScript](https://rescript-lang.org) bindings for\n[`react-native-inappbrowser-reborn`](https://github.com/proyecto26/react-native-inappbrowser).\n\nExposed as `ReactNativeInAppBrowser` module.\n\n`@rescript-react-native/inappbrowser` X.y.\\* means it's compatible with\n`react-native-inappbrowser-reborn` X.y.\\*\n\n## Installation\n\nWhen\n[`react-native-inappbrowser-reborn`](https://github.com/proyecto26/react-native-inappbrowser)\nis properly installed \u0026 configured by following their installation instructions,\nyou can install the bindings:\n\n```console\nnpm install @rescript-react-native/inappbrowser\n# or\nyarn add @rescript-react-native/inappbrowser\n```\n\n`@rescript-react-native/inappbrowser` should be added to `bs-dependencies` in your\n`bsconfig.json`:\n\n```diff\n{\n  //...\n  \"bs-dependencies\": [\n    \"@rescript/react\",\n    \"rescript-react-native\",\n    // ...\n+    \"@rescript-react-native/inappbrowser\"\n  ],\n  //...\n}\n```\n\n## Usage\n\n```rescript\nopen Js.Promise;\nopen ReactNativeInAppBrowser;\n\nlet opts = iosOptions(~preferredBarTintColor=\"#ff0000\", ());\nopenBrowser(\"https://rescript-lang.org\", `IosOptions(opts))\n|\u003e Js.Promise.then_((result: browserResult) =\u003e {\n     Js.log(result.resultType);\n     resolve();\n   })\n|\u003e ignore;\n```\n\n```rescript\nopen Js.Promise;\nopen ReactNativeInAppBrowser;\n\nopenAuthIos(\"https://example.com/auth\", \"myschema://auth\", `IosOptions(iosOptions()))\n|\u003e Js.Promise.then_((result: authResult) =\u003e {\n     switch (result.url) {\n       | Some(url) =\u003e Js.log(url)\n       | None =\u003e Js.log(\"Something went wrong\")\n     };\n     resolve();\n   })\n|\u003e ignore;\n```\n\n### Types\n\n#### `authResult`\n\n#### `browserResult`\n\n#### `iosOptions`\n\n#### `androidOptions`\n\n### Methods\n\n#### `ReactNativeInAppBrowser.openBrowser`\n\n```rescript\n(string,  [ `AndroidOptions(androidOptions) | `IosOptions(iosOptions) ]) =\u003e Js.Promise.t(browserResult)\n```\n\n#### `ReactNativeInAppBrowser.close`\n\n```rescript\nunit =\u003e unit\n```\n\n#### `ReactNativeInAppBrowser.openAuth`\n\n```rescript\n(string, [ `AndroidOptions(androidOptions) | `IosOptions(iosOptions) ]) =\u003e Js.Promise.t(authResult)\n```\n\n#### `ReactNativeInAppBrowser.closeAuth`\n\n```rescript\nunit =\u003e unit\n```\n\n---\n\n## Changelog\n\nCheck the [changelog](./CHANGELOG.md) for more informations about recent\nreleases.\n\n---\n\n## Contribute\n\nRead the\n[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)\nbefore contributing.\n\n## Code of Conduct\n\nWe want this community to be friendly and respectful to each other. Please read\n[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)\nso that you can understand what actions will and will not be tolerated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frescript-react-native%2Finappbrowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frescript-react-native%2Finappbrowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frescript-react-native%2Finappbrowser/lists"}