{"id":16719209,"url":"https://github.com/kennetpostigo/reason-navigation","last_synced_at":"2026-03-05T21:32:48.341Z","repository":{"id":57348978,"uuid":"89359229","full_name":"kennetpostigo/reason-navigation","owner":"kennetpostigo","description":"Declarative Routing for ReasonReact","archived":false,"fork":false,"pushed_at":"2017-12-13T13:31:34.000Z","size":101,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-25T04:42:50.662Z","etag":null,"topics":["navigation","react","reason-react","reasonml","router","routing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kennetpostigo.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-25T12:42:00.000Z","updated_at":"2023-03-30T13:44:17.000Z","dependencies_parsed_at":"2022-09-19T12:11:06.135Z","dependency_job_id":null,"html_url":"https://github.com/kennetpostigo/reason-navigation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kennetpostigo/reason-navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennetpostigo%2Freason-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennetpostigo%2Freason-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennetpostigo%2Freason-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennetpostigo%2Freason-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennetpostigo","download_url":"https://codeload.github.com/kennetpostigo/reason-navigation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennetpostigo%2Freason-navigation/sbom","scorecard":{"id":555355,"data":{"date":"2025-08-11","repo":{"name":"github.com/kennetpostigo/reason-navigation","commit":"3b20f03e2baa925b5a697853e74b37d59b7f996e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: License.md:0","Info: FSF or OSI recognized license: MIT License: License.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-mvjj-gqq2-p4hw","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T12:11:05.412Z","repository_id":57348978,"created_at":"2025-08-20T12:11:05.412Z","updated_at":"2025-08-20T12:11:05.412Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30150445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T21:15:50.531Z","status":"ssl_error","status_checked_at":"2026-03-05T21:15:11.173Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["navigation","react","reason-react","reasonml","router","routing"],"created_at":"2024-10-12T21:40:57.121Z","updated_at":"2026-03-05T21:32:48.316Z","avatar_url":"https://github.com/kennetpostigo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"300px\" src=\"assets/reason-navigation.png\" /\u003e\n\u003c/p\u003e\n\u003cp style=\"margin-top: 20px; font-size: 24px; font-weight: 500;\" align=\"center\"\u003ereason-navigation\u003c/p\u003e\n\u003cp style=\"margin-top: 20px;\" align=\"center\"\u003e\n  \u003ca href=\"http://npm.im/reason-navigation\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/reason-navigation.svg?style=flat-square\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://npm-stat.com/charts.html?package=reason-navigation\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/reason-navigation.svg?style=flat-square\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/reason-navigation.svg?style=flat-square\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Install\n\n```bash\nyarn install reason-navigation\n```\n\n## bsconfig\n\n```json\n\"bs-dependencies\": [\n  \"reason-react\",\n  \"reason-navigation\"\n]\n```\n\n## Example\n\n```reason\nlet component = ReasonReact.statelessComponent(\"App\");\n\nlet make = (_children) =\u003e {\n  ...component,\n  render: (_self) =\u003e\n    \u003cRouter\u003e\n      (\n        (history) =\u003e\n          \u003cdiv\u003e\n            \u003ch1\u003e (U.se(\"Reason Router\")) \u003c/h1\u003e\n            \u003cLink history href=\"/game\"\u003e (U.se(\"GAME\")) \u003c/Link\u003e\n            \u003cRoute history path=\"/\" render=(() =\u003e \u003cLanding history /\u003e) /\u003e\n            \u003cRoute history path=\"/game\" render=(() =\u003e \u003cCanvas history /\u003e) /\u003e\n            \u003cRoute\n              history\n              path=\"/re/:id\"\n              render=(\n                () =\u003e {\n                  switch (Match.getInt(history.state.params, \"id\")) {\n                  | Some(v) =\u003e Js.log(v)\n                  | None =\u003e Js.log(\"None\")\n                  };\n                  \u003cp\u003e (ReasonReact.stringToElement(\"Query params!\")) \u003c/p\u003e\n                }\n              )\n            /\u003e\n            \u003cRoute history path=\"/highscores\" render=(() =\u003e \u003cHighScore history /\u003e) /\u003e\n          \u003c/div\u003e\n      )\n    \u003c/Router\u003e\n};\n```\n\n## Navigation Components\n\n### `\u003cRouter children: (history) =\u003e ReasonReact.element/\u003e`\n\nRouter takes a function as a child, with a parameter that is passed a history\nobject. The body should be a single reason-react component, like a `\u003cdiv /\u003e`\nthat wraps a bunch of child `\u003cRoute /\u003e` components.\n\n### `\u003cRoute history: Router.history path: string render: unit =\u003e ReasonReact.element /\u003e`\n\nRoute needs to be passed the `Router.history` record that contains data in order\nto determine whether it should render on a certain path or not. It also requires\na `path` that the route needs to match against, and lastly a `render` function\nthat passes query params and other data that is useful.\n\n### `\u003cLink history: Router.history href: string target: string /\u003e`\n\nLink needs to be passed the `Router.history` record that contains actions to\nupdate the browser location. It also takes an `href` to determine where to go\nwhen the link is pressed. and lastly takes a target to determine where to open\nthe link.\n\n## Query Params\n\nWhen accessing query params, you should use the query accessors that\n`reason-navigation` provides.\n\n### `getInt(params: Js.Dict.t(string), field: string) =\u003e option(int)`\n\nIt will return `Some(int)` if they field you are accessing is present and an\n`int`.\n\n```reason\nswitch (Match.getInt(match.state.params, \"id\")) {\n| Some(v) =\u003e Js.log(v)\n| None =\u003e Js.log(\"None\")\n};\n```\n\n### `getString(params: Js.Dict.t(string), field: string) =\u003e option(string)`\n\nIt will return `Some(string)` if they field you are accessing is present and an\n`string`.\n\n```reason\nswitch (Match.getString(match.state.params, \"id\")) {\n| Some(v) =\u003e Js.log(v)\n| None =\u003e Js.log(\"None\")\n};\n```\n\n## Types\n\n### Router.state\n\n```reason\ntype state = {\n  path: string,\n  search: string,\n  hash: string,\n  params: Js.Dict.t(string),\n  unlisten: [@bs] (unit =\u003e unit)\n};\n```\n\n### Router.actions\n\n```reason\ntype actions = {\n  push: string =\u003e unit,\n  replace: string =\u003e unit,\n  updateMatch: (string, string, Js.Dict.t(string)) =\u003e unit\n};\n```\n\n### Router.history\n\n```reason\ntype history = {\n  state,\n  actions\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennetpostigo%2Freason-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennetpostigo%2Freason-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennetpostigo%2Freason-navigation/lists"}