Skip to content

dashed/react-either

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-either

Higher-order component to conditionally render a component or an alternative component

Usage

$ npm install --save react-either
const either = require('react-either');

either(Component, AltComponent, function(props) {

    // ...

    // return true to render Component; otherwise render AltComponent
    return cond;
});

License

MIT

About

Higher-order component to conditionally render either a component or an alternative component

Resources

License

Stars

Watchers

Forks

Packages

No packages published