An open API service indexing awesome lists of open source software.

https://github.com/alexsergey/react-switch-case

Switch statement in React components
https://github.com/alexsergey/react-switch-case

Last synced: 11 months ago
JSON representation

Switch statement in React components

Awesome Lists containing this project

README

          

# React Switch Case

Little switch-case React component to render nested components.

## Usage

### Step 1:
```sh
npm install react-switch-case -save
```

### Step 2:

```jsx
import Switch, { Case, Default } from 'react-switch-case';
```

### Step 3:

```jsx
const componentShow = 'component1';

compare(value)}>

Component 1


Component 2


Nothing!

```

## License

MIT