https://github.com/hadiab/react-condition
React Condition
https://github.com/hadiab/react-condition
conditional-rendering library react reactjs
Last synced: 30 days ago
JSON representation
React Condition
- Host: GitHub
- URL: https://github.com/hadiab/react-condition
- Owner: hadiab
- License: mit
- Created: 2018-08-07T07:07:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-13T07:39:28.000Z (almost 8 years ago)
- Last Synced: 2025-10-16T09:51:42.650Z (8 months ago)
- Topics: conditional-rendering, library, react, reactjs
- Language: JavaScript
- Size: 45.9 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Condition
React conditional rendering more friendly way
## Install
```
npm install reactjs-condition
yarn add reactjs-condition
```
## How it works?
```javascript
import { If } from 'reactjs-condition'
TRUE
```
```javascript
import { If, Else } from 'reactjs-condition'
TRUE
FALSE
```
```javascript
import { If, ElseIf, Else } from 'reactjs-condition'
const fruit = 'Apple'
Apple
Orange
Banana
```