A tiny library for conditional rendering in JSX.

Basic Usage

npm install --save react-cr

import { Visibility , Switch } from ' react-cr ' ; < Visibility visible = { this . state . showLogo } > < Logo / > < / Visibility > < Switch index = { 1 } > < First / > < Second / > < / Switch > < Switch index = { [ 1 , 10 , 12 , 43 ] } > { items . map ( ... ) } < / Switch > < Repeat count = { this . state . stars } > < RatingStar / > < / Repeat > < Mobile > < MobileMenu / > < / Mobile > < Interleave wrapper = " p " separator = { < span > , < / span > } > < span key = " alpha " > Alpha < / span > < span key = " beta " > Beta < / span > < span key = " gamma " > Gamma < / span > < / Interleave >

Components

See detailed specification

License

react-cr is available under MIT. See LICENSE for more details.