An open API service indexing awesome lists of open source software.

https://github.com/dashed/react-either

Higher-order component to conditionally render either a component or an alternative component
https://github.com/dashed/react-either

Last synced: 7 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# react-either

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

## Usage

```
$ npm install --save react-either
```

```js

const either = require('react-either');

either(Component, AltComponent, function(props) {

// ...

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

## License

MIT