{"id":13726729,"url":"https://github.com/cca-io/bs-react-navigation","last_synced_at":"2025-05-07T22:30:29.455Z","repository":{"id":51310605,"uuid":"153246168","full_name":"cca-io/bs-react-navigation","owner":"cca-io","description":"Reason bindings for react-navigation","archived":true,"fork":false,"pushed_at":"2021-05-16T12:38:56.000Z","size":17,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-14T17:47:23.783Z","etag":null,"topics":["bucklescript","react","react-navigation","reason","reasonml"],"latest_commit_sha":null,"homepage":null,"language":"Reason","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/cca-io.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":"2018-10-16T08:01:12.000Z","updated_at":"2023-12-26T09:50:47.000Z","dependencies_parsed_at":"2022-09-09T23:22:16.185Z","dependency_job_id":null,"html_url":"https://github.com/cca-io/bs-react-navigation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca-io%2Fbs-react-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca-io%2Fbs-react-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca-io%2Fbs-react-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca-io%2Fbs-react-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cca-io","download_url":"https://codeload.github.com/cca-io/bs-react-navigation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965069,"owners_count":21832817,"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":["bucklescript","react","react-navigation","reason","reasonml"],"created_at":"2024-08-03T01:03:18.072Z","updated_at":"2025-05-07T22:30:29.077Z","avatar_url":"https://github.com/cca-io.png","language":"Reason","readme":"# bs-react-navigation\n\n[Reason](https://reasonml.github.io) bindings to [react-navigation](https://github.com/react-navigation/react-navigation).\n\n## Status\n\nSuperseded by https://github.com/rescript-react-native/rescript-react-navigation.\n\n## Example\n\nInstantiate a navigation module with your `screenProps` type (Navigation.re):\n\n```reason\ninclude ReactNavigation.Make({\n  type screenProps = {\n    .\n    \"someProp\": int,\n  };\n});\n```\n\nA screen component with dynamic navigation options (Screen1.re):\n\n```reason\nopen ReactNative;\nopen Navigation;\n\n[@react.component]\nlet make = (~navigation, ~screenProps) =\u003e {\n  \u003cText\u003e {React.string(\"Hello world!\")} \u003c/Text\u003e,\n};\n\nmake-\u003esetDynamicNavigationOptions(params =\u003e {\n  let navigation = params##navigation;\n  let navigationOptions = params##navigationOptions;\n  let screenProps = params##screenProps;\n\n  /* More properties can be set dynamically based on navigation, navigationOptions or screenProps. */\n  NavigationOptions.t(~title=\"Screen 1\", ~headerTintColor=\"red\", ());\n});\n```\n\nA stack navigator containing this screen (MyStackNavigator.re):\n\n```reason\nopen Navigation;\n\nlet routes = {\n  \"Screen1\": Screen1.make,\n  \"Screen2\": Screen2.make,\n  \"Screen3\": Screen3.make,\n};\n\nlet navigator = StackNavigator.make(routes);\nnavigator-\u003esetNavigationOptions(NavigationOptions.t(~gesturesEnabled=false, ()));\n```\n\nThe main React component of the app (App.re):\n\n```reason\nopen Navigation;\n\nmodule AppContainer = (val makeAppContainer(MyStackNavigator.navigator));\n\n[@react.component]\nlet make = () =\u003e {\n  let screenProps = {\"someProp\": 42};\n\n  \u003cAppContainer screenProps /\u003e;\n};\n```\n","funding_links":[],"categories":["Reason"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca-io%2Fbs-react-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcca-io%2Fbs-react-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca-io%2Fbs-react-navigation/lists"}