# react-rendering-conditional

> Conditionally rendered react components

Latest version **1.0.0** (published 2018-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-rendering-conditional
pnpm add react-rendering-conditional
yarn add react-rendering-conditional
bun add react-rendering-conditional
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-12-09 |
| First published | 2018-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bruno Facundo |
| Maintainers | brunofacundo |
| Keywords | react, react-component, if else elseif, conditional, react condition, rendering |

## Links

- npm: https://www.npmjs.com/package/react-rendering-conditional
- npm.io page: https://npm.io/package/react-rendering-conditional

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-12-09

## README

# React Rendering Conditional

# Installation
```sh
yarn add react-rendering-conditional
```
or
```sh
npm install react-rendering-conditional --save
```

# Usage

```jsx
  import {Conditional, If, Else} from 'react-rendering-conditional';

  <Condition>
    <If is={this.state.authenticated}>
      If condition
    </If>
    <Else>
      Else Condition
    </Else>
  </Condition>
```

It also support for ElseIf block.

```jsx
  import {Conditional, If, Else, ElseIf} from 'react-rendering-conditional';

  <Condition>
    <If is={false}>
      If condition
      <Condition>
        <If is={false}>
          Nested If condition
        </If>
        <Else>
          Nested Else Condition
        </Else>
      </Condition>
    </If>
    <ElseIf is={false}>
      Else If condition
    </ElseIf>
    <Else>
      Else Condition
    </Else>
  </Condition>
```

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