https://github.com/pyaesone17/react-else-if
React Conditional Renderer Component that allows you to write jsx like a template engine
https://github.com/pyaesone17/react-else-if
if-else jsx-syntax react react-component react-condition react-if
Last synced: about 1 month ago
JSON representation
React Conditional Renderer Component that allows you to write jsx like a template engine
- Host: GitHub
- URL: https://github.com/pyaesone17/react-else-if
- Owner: pyaesone17
- License: mit
- Created: 2017-08-04T16:24:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T15:42:44.000Z (almost 9 years ago)
- Last Synced: 2025-08-22T21:10:26.205Z (9 months ago)
- Topics: if-else, jsx-syntax, react, react-component, react-condition, react-if
- Language: JavaScript
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Condition
React Conditional Renderer Component that allows you to write jsx like a template engine. It will be helpful for
developer who comes from backend environment.
# Installation
npm install react-else-if
yarn add react-else-if
# Usage
It allows u to render everything like a template engine like this
```jsx
import Condition,{If, Else, ElseIf} from 'react-else-if';
If condition
Else Condition
```
It also support for ElseIf block to make ur life more easier.
```jsx
import Condition,{If, Else, ElseIf} from 'react-else-if';
If condition
Nested If condition
Nested Else Condition
Else If condition
Else Condition
```
# Note
Since javascript allow you more control, you should still use javascript for render you views.
Nothing more, it is just my private component, that i keep using in my project and I want to share.
# Future
In the next major version, the package will provide switch statement.