React Comfort
Descriptionβ
React Comfort is a React library that provides utilities for common programming tasks, that make coding in React easier and cleaner.
Installationβ
npm install react-comfort
Exampleβ
import {If, Else} from 'react-comfort'
const Bar = (props) => {
return (
<If condition={props.age >= 18}>
<h2>πΊπΊπΊ</h2>
<p>Buy alcohol!</p>
<Else>
<h2>π«π«π«</h2>
<p>Sorry, children cannot purchase alcohol!</p>
</Else>
</If>
)
}
Referencesβ
- Components