https://github.com/afeiship/react-condition-manager
React condition manager.
https://github.com/afeiship/react-condition-manager
break case condition else elseif if manager rcm react switch
Last synced: 2 months ago
JSON representation
React condition manager.
- Host: GitHub
- URL: https://github.com/afeiship/react-condition-manager
- Owner: afeiship
- Created: 2017-05-26T03:32:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T08:25:24.000Z (over 1 year ago)
- Last Synced: 2025-01-26T09:37:27.306Z (over 1 year ago)
- Topics: break, case, condition, else, elseif, if, manager, rcm, react, switch
- Language: TypeScript
- Homepage:
- Size: 1.03 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-condition-manager
> React condition manager.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```shell
npm install -S @jswork/react-condition-manager
```
## usage
1. import css
```scss
@import "~@jswork/react-condition-manager/dist/style.css";
// or use sass
@import "~@jswork/react-condition-manager/dist/style.scss";
```
2. import js
```js
import Rcm from '../../lib/src';
// import '@jswork/react-condition-manager/style.scss';
import React, { useState } from 'react';
function App() {
const [status, setStatus] = useState('init');
return (
Build Time: {BUILD_TIME}
React Condition Manager
Current Status: {status}
setStatus('init')}>set init
setStatus('show')}>set show
setStatus('hide')}>set hide
Hello World - init
Hello World - show
Hello World - hide
Only one condition
Hello World - init
);
}
export default App;
```
## preview
- https://afeiship.github.io/react-condition-manager/
## license
Code released under [the MIT license](https://github.com/afeiship/react-condition-manager/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/react-condition-manager
[version-url]: https://npmjs.org/package/@jswork/react-condition-manager
[license-image]: https://img.shields.io/npm/l/@jswork/react-condition-manager
[license-url]: https://github.com/afeiship/react-condition-manager/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-condition-manager
[size-url]: https://github.com/afeiship/react-condition-manager/blob/master/dist/react-condition-manager.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/react-condition-manager
[download-url]: https://www.npmjs.com/package/@jswork/react-condition-manager