1.0.20 • Published 7 years ago

react-condom v1.0.20

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

React Condom

React Condom is a protective layer around your raw, unprotected components. In a claims based authentication system, a user typically has his own claims and the component can have a rule. This currently is a one to one string equality check. If the rule in a component is available within the rule set (Claims) of the user, the component renders whatever is inside, else it falls back to the fallback component.

Check the tutorial

Usage :

import ReactCondom from 'react-condom';
var ruleSet = ['rule1', 'rule2'];
var componentRule = 'rule1';
<ReactCondom ruleSet={ruleSet} rule={componentRule} fallBack={<div>Access Denied</div>}>
    <div>
        Paid Component
    </div>
<ReactCondom>
1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago