# react-match-render

> Neat way to render components conditionally

Latest version **0.9.0** (published 2020-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-match-render
pnpm add react-match-render
yarn add react-match-render
bun add react-match-render
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.0 |
| Published | 2020-04-07 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 31.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Seongwoon Hong |
| Maintainers | seong7 |

## Links

- npm: https://www.npmjs.com/package/react-match-render
- npm.io page: https://npm.io/package/react-match-render

## Dependencies (6)

- [react](https://npm.io/package/react.md) ^16.13.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.1
- [react-scripts](https://npm.io/package/react-scripts.md) 3.4.0
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^9.3.2
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^4.2.4
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^7.1.2

## Recent versions

- 0.9.0 (latest) — 2020-04-07

## README

## React-Match-Render
> Render components conditionally inside render function in a neat way.

### Installation
`
npm i -S react-match-render
`

### Usage
```javascript
import MatchRender from 'react-match-render';

...

const userType = ..
const isLoggedIn = ...

<MatchRender
    requirements={[true, 'ADMIN']}
    conditions={[isLoggedIn, userType]}
>
    <PrivateRoutes />
</MatchRender>
```

---
_Source: https://npm.io/package/react-match-render · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
