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

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

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.