react-decide

1.0.1 • Public • Published

react-decide

Commitizen friendly Build Status npm

React Component to make the Conditional Render look Elegant.

A Cleaner, Better way of writing conditional statements in React.

Installation

yarn add react-decide

or

npm install --save react-decide

Usage

<Decide>
    <If condition={false}>
        // Render on If Condition
    </If>

    <ElseIf condition={() => {
            //Do Something 
            return false;
        }}>
        // Render on ElseIf Condition
    </ElseIf>

    <Else>
        // Render on If Condition
    </Else>
</Decide>

Package Sidebar

Install

npm i react-decide

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

209 kB

Total Files

19

Last publish

Collaborators

  • inf3cti0n95