package
Higher-order component to conditionally render a component or an alternative component
npm install react-eitherGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Higher-order component to conditionally render a component or an alternative component
$ npm install --save minitrueconst either = require('react-either');
either(Component, AltComponent, function(props) {
// ...
// return true to render Component; otherwise render AltComponent
return cond ? true : false;
});MIT