# react-render-conditions

> A React component that conditionally renders its children based on a condition.

Latest version **0.0.1** (published 2024-03-19) · MIT license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2024-03-19 |
| First published | 2024-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Shashikant S. Wagh |
| Maintainers | shashikant_wagh |
| Keywords | react, reactjs, switch, case, conditions, react conditions, react render condition, react render conditions, conditional render, conditional rendering, react conditional rendering, react conditional rendering component, react conditional rendering library, react conditional rendering package, react conditional rendering npm package, react conditional rendering npm library |

## Links

- npm: https://www.npmjs.com/package/react-render-conditions
- Repository: https://github.com/shashikant-wagh/react-render-conditions
- Homepage: https://github.com/shashikant-wagh/react-render-conditions#readme
- Issues: https://github.com/shashikant-wagh/react-render-conditions/issues
- npm.io page: https://npm.io/package/react-render-conditions

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2024-03-19

## README

# React Conditional Rendering

This is a React library for conditional rendering.

## Installation

Use the package manager [npm](https://www.npmjs.com/) to install react-render-conditions.

```bash
npm install react-render-conditions
```

## Usage

```
import { Switch, Case, Default } from 'react-render-conditions';

function MyComponent() {
  return (
    <Switch>
      <Case condition={true}>This will render</Case>
      <Case condition={false}>This will not render</Case>
      <Default>This will render if none of the Cases render</Default>
    </Switch>
  );
}
```

## Running Tests

To run tests, use the following command:

```bash
npm test
```

## Author

```
Shashikant S. Wagh shashikantwagh721@gmail.com
```

## License

```
This project is licensed under the MIT License.
```

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