react-toggle-state
v0.2.1
Published
Downloads
9
Readme
React-toggle-state
Example:
import ToggleState from 'react-toggle-state';
<ToggleState>
{({isTrue, turnTrue, turnFalse}) =>
<div>
<p>This is {isTrue ? 'true': 'false'}</p>
<button onClick={isTrue ? turnFalse : turnTrue}>Toggle</button>
</div>
}
</ToggleState>