{"id":16783161,"url":"https://github.com/rikschennink/react-contextual-router","last_synced_at":"2025-04-10T22:17:57.462Z","repository":{"id":65372696,"uuid":"77435485","full_name":"rikschennink/react-contextual-router","owner":"rikschennink","description":"📱Render components based on user context","archived":false,"fork":false,"pushed_at":"2018-01-16T07:55:43.000Z","size":51,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T22:17:50.563Z","etag":null,"topics":["context","javascript","media-queries","plugin","react","router"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rikschennink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-27T07:32:29.000Z","updated_at":"2021-07-31T18:06:40.000Z","dependencies_parsed_at":"2023-07-02T08:42:19.614Z","dependency_job_id":null,"html_url":"https://github.com/rikschennink/react-contextual-router","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikschennink%2Freact-contextual-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikschennink%2Freact-contextual-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikschennink%2Freact-contextual-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikschennink%2Freact-contextual-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rikschennink","download_url":"https://codeload.github.com/rikschennink/react-contextual-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305856,"owners_count":21081577,"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":["context","javascript","media-queries","plugin","react","router"],"created_at":"2024-10-13T07:49:05.924Z","updated_at":"2025-04-10T22:17:57.443Z","avatar_url":"https://github.com/rikschennink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Contextual Router\n\nReact Contextual Router is a contextual routing library for React based on [Conditioner](https://github.com/rikschennink/conditioner).\n\nRender components based on user context.\n\n\n## Installation\n\n`npm install react-contextual-router --save`\n\n\n## Usage\n\n```jsx\nimport React, { Component } from 'react';\nimport { Context, ContextRouter } from 'react-contextual-router';\n\nclass FallbackComponent extends Component {\n    render() {\n        return \u003cb\u003eFallback\u003c/b\u003e;\n    }\n}\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cContextRouter\u003e\n        \u003cContext query=\"@media (min-width:40em)\"\u003e\n          \u003ch1\u003eHello\u003c/h1\u003e\n        \u003c/Context\u003e\n\n        \u003cContext query=\"@media (max-width:30em)\"\u003e\n          \u003ch1\u003eWorld\u003c/h1\u003e\n        \u003c/Context\u003e\n\n        \u003cContext component={FallbackComponent} /\u003e\n      \u003c/ContextRouter\u003e\n    );\n  }\n}\n\nexport default App;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikschennink%2Freact-contextual-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikschennink%2Freact-contextual-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikschennink%2Freact-contextual-router/lists"}