# react-switch-case-module

> a module to make conditional rendering easily

Latest version **2.0.7** (published 2023-01-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-switch-case-module
pnpm add react-switch-case-module
yarn add react-switch-case-module
bun add react-switch-case-module
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2023-01-28 |
| First published | 2021-03-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Adri HM |
| Maintainers | adrihm |
| Keywords | react, switch-case |

## Links

- npm: https://www.npmjs.com/package/react-switch-case-module
- Repository: https://github.com/ady642/react-switch-case
- Homepage: https://github.com/ady642/react-switch-case#readme
- Issues: https://github.com/ady642/react-switch-case/issues
- npm.io page: https://npm.io/package/react-switch-case-module

## Dependencies (1)

- [@rollup/plugin-typescript](https://npm.io/package/@rollup/plugin-typescript.md) ^11.0.0

## 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

- 2.0.7 (latest) — 2023-01-28
- 2.0.6 — 2023-01-28
- 2.0.3 — 2023-01-28
- 2.0.2 — 2023-01-28
- 2.0.1 — 2023-01-28
- 2.0.0 — 2023-01-28
- 1.1.2 — 2022-04-14
- 1.1.1 — 2021-03-17
- 1.1.0 — 2021-03-17
- 1.0.0 — 2021-03-16

## README

# React Switch Case Module

Switch component to easy make conditional rendering

### First install the package:
```
npm install react-switch-case-module
```

### And import the module:
```
import { Switch, Case } from 'react-switch-case-module';
```

### Then you can use it:

```
<Switch 
    componentName={'HelloComponent'} 
    defaultComponent={<div>Default component</div>}
>
    <Case value={'HelloComponent'}><div>Hello</div></Case>
    <Case value={'ByeComponent'}><div>Bye</div></Case>
</Switch>
```

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