# recond

> A react library which checks conditions.

Latest version **1.1.1** (published 2021-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install recond
pnpm add recond
yarn add recond
bun add recond
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-09-28 |
| First published | 2021-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | iscanyc |
| Keywords | react, reactjs |

## Links

- npm: https://www.npmjs.com/package/recond
- Homepage: https://github.com/iscanyc/recond#readme
- npm.io page: https://npm.io/package/recond

## 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.1.1 (latest) — 2021-09-28

## README

# iscanyc/recond

![npm](https://img.shields.io/npm/dw/recond)
![NPM](https://img.shields.io/npm/l/recond)
![npm](https://img.shields.io/npm/v/recond)

> Recond makes react conditional render flexible. It is closer to if else statements.

## Example

Renders CondOne.

```js
<Recond
  methods={{
    CondOne: () => "Hello!",
    CondTwo: () => "Hey.",
  }}
  conditions={{
    CondOne: true,
    CondTwo: true,
  }}
/>
```

Renders CondTwo.

```js
<Recond
  methods={{
    CondOne: () => "Hello!",
    CondTwo: () => "Hey.",
  }}
  conditions={{
    CondOne: false,
    CondTwo: true,
  }}
/>
```

If doesnt match any condition, you can use defaultMethod. Now defaultMethod is rendered.

```js
<Recond
  methods={{
    CondOne: () => "Hello!",
    CondTwo: () => "Hey.",
  }}
  conditions={{
    CondOne: false,
    CondTwo: false,
  }}
  defaultValue="Hey, this is default value"
/>
```

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