New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

react-contextual-router

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-contextual-router

React Contextual Router, render components based on user context.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
6
100%
Maintainers
1
Weekly downloads
 
Created
Source

React Contextual Router

React Contextual Router is a routing library for React for conditional component loaded based on the user context. For instance, is the user using the app on a wide screen, is the user using a pointer device, has the user seen a component. Based on this information you can then load component A or B to better suit functionality to the context of the user.

For now, this is an experiment in porting ConditionerJS to React.

Example

<ContextRouter>
  <Context matches="media:{(min-width:50em)} and element:{was visible}">
    
    <p>Only show on big viewports when the element has been scrolled into view.</p>

  </Context>
  <Context matches="*">
    
    <p>If the above is not matched, show this instead.</p>

  </Context>
</ContextRouter>

FAQs

Package last updated on 27 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts