Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 384 Bytes

README.md

File metadata and controls

28 lines (16 loc) · 384 Bytes

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