{"id":14977660,"url":"https://github.com/elemental-design/react-router-primitives","last_synced_at":"2026-01-30T18:33:18.225Z","repository":{"id":42922447,"uuid":"245252313","full_name":"elemental-design/react-router-primitives","owner":"elemental-design","description":"React router primitives","archived":false,"fork":false,"pushed_at":"2023-01-05T09:11:12.000Z","size":36,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-26T02:55:23.185Z","etag":null,"topics":["react","react-primitives","react-router","react-router-primitives"],"latest_commit_sha":null,"homepage":null,"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/elemental-design.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":"2020-03-05T19:40:14.000Z","updated_at":"2020-03-18T19:40:41.000Z","dependencies_parsed_at":"2023-02-03T22:16:22.516Z","dependency_job_id":null,"html_url":"https://github.com/elemental-design/react-router-primitives","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elemental-design/react-router-primitives","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemental-design%2Freact-router-primitives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemental-design%2Freact-router-primitives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemental-design%2Freact-router-primitives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemental-design%2Freact-router-primitives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elemental-design","download_url":"https://codeload.github.com/elemental-design/react-router-primitives/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemental-design%2Freact-router-primitives/sbom","scorecard":{"id":372172,"data":{"date":"2025-08-11","repo":{"name":"github.com/elemental-design/react-router-primitives","commit":"c981d6d206fb2f86adccdd653aeda7dc221c5aa1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/8 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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T13:13:40.086Z","repository_id":42922447,"created_at":"2025-08-18T13:13:40.086Z","updated_at":"2025-08-18T13:13:40.086Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28917042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"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":["react","react-primitives","react-router","react-router-primitives"],"created_at":"2024-09-24T13:56:05.626Z","updated_at":"2026-01-30T18:33:18.167Z","avatar_url":"https://github.com/elemental-design.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-primitives\nCreate cross-platform app routing for React web, React Native and react-sketchapp.\n\n(work in progress and unstable API). Please wait for 0.1.0 release as a minimum for a more stable API.\n\n## Getting Started\n\n```sh\nnpm i -S react-router-primitives\n```\n\n## API\n\n```js\nmodule.exports = {\n  Router,\n  Route,\n  Link,\n  Switch,\n  withRouter,\n}\n```\n\n### Exported Components and Methods\n\n\n### `\u003cRouter\u003e`\n\nA universal router component that uses `\u003cBrowserRouter\u003e` on web, `\u003cSketchRouter\u003e` on React Sketch.app and `\u003cNativeRouter\u003e` on React Native. Thanks to [ReactTraining/react-router](https://github.com/ReactTraining/react-router/).\n\n#### Props\n\n| Prop        | Type                          | Default      | Note |\n| ----------- | ----------------------------- | ------------ | --- |\n| `location`  | [`string`]    \\| [`Location`]  | **required** | String or Location e.g. `{ key: 'ac3df4', pathname: '/somewhere', search: '?some=search-string', hash: '#howdy', state:  [userDefined]: true } }` |\n| `locations` | [`string[]`] \\| [`Location[]`]  | **required** | List of strings or locations |\n| `viewport`  | [`viewport`]                   | **required** | Object: { name: string, width: number, height: number}  |\n| `children`  | [`Node`]                       | **required** |            |\n\n#### Example\n\n```js\nimport sketch from 'sketch';\nimport { Router, Route, Switch } from 'react-router-primitives';\nimport { RedBox, render } from 'react-sketchapp';\n\nconst pageWidth = ...;\n\n// Multi-platform app component (can be imported from component library or other file)\nconst App = () =\u003e (\n    \u003cRouter\n      locations={['/profile/john']}\n      viewport={viewports}\n    \u003e\n      \u003cSwitch\u003e\n        \u003cRoute exact path=\"/\" render={() =\u003e \u003cHome /\u003e} /\u003e\n        \u003cRoute path=\"/about\" render={() =\u003e \u003cAbout /\u003e} /\u003e\n        \u003cRoute path=\"/profile/:username\" render={({ match: { params } }) =\u003e \u003cProfile {...params} /\u003e} /\u003e\n        \u003cRoute component={NotFound} /\u003e\n      \u003c/Switch\u003e\n    \u003c/SketchRouter\u003e\n  \u003c/Page\u003e\n);\n\n// Sketch entry-point\nexport default () =\u003e {\n  const { selectedPage } = sketch.getSelectedDocument();\n  try {\n    render((\n      \u003cPage name=\"App\" style={{ flexDirection: 'row', flexWrap: 'wrap', maxWidth: pageWidth }}\u003e\n        \u003cApp /\u003e\n      \u003c/Page\u003e\n    ), selectedPage);\n  } catch (err) {\n    render(\u003cRedBox error={err} /\u003e, selectedPage);\n  }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemental-design%2Freact-router-primitives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felemental-design%2Freact-router-primitives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemental-design%2Freact-router-primitives/lists"}