{"id":15839588,"url":"https://github.com/afeiship/react-condition-manager","last_synced_at":"2026-02-16T01:44:08.320Z","repository":{"id":57122962,"uuid":"92468517","full_name":"afeiship/react-condition-manager","owner":"afeiship","description":"React condition manager.","archived":false,"fork":false,"pushed_at":"2025-01-06T08:25:24.000Z","size":1075,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T09:37:27.306Z","etag":null,"topics":["break","case","condition","else","elseif","if","manager","rcm","react","switch"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-26T03:32:23.000Z","updated_at":"2025-01-06T08:25:28.000Z","dependencies_parsed_at":"2025-02-07T11:10:58.605Z","dependency_job_id":"81a64808-07e9-44a4-9c8f-c5a7771c42f6","html_url":"https://github.com/afeiship/react-condition-manager","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-condition-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-condition-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-condition-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-condition-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/react-condition-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249138946,"owners_count":21218975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["break","case","condition","else","elseif","if","manager","rcm","react","switch"],"created_at":"2024-10-05T16:20:35.055Z","updated_at":"2026-02-16T01:44:08.274Z","avatar_url":"https://github.com/afeiship.png","language":"TypeScript","readme":"# react-condition-manager\n\u003e React condition manager.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```shell\nnpm install -S @jswork/react-condition-manager\n```\n\n## usage\n1. import css\n  ```scss\n  @import \"~@jswork/react-condition-manager/dist/style.css\";\n\n  // or use sass\n  @import \"~@jswork/react-condition-manager/dist/style.scss\";\n  ```\n2. import js\n  ```js\n  import Rcm from '../../lib/src';\n  // import '@jswork/react-condition-manager/style.scss';\n  import React, { useState } from 'react';\n\n  function App() {\n    const [status, setStatus] = useState('init');\n    return (\n      \u003cdiv className=\"m-10 p-4 y-5 shadow bg-gray-100 text-gray-800 hover:shadow-md transition-all\"\u003e\n        \u003cdiv className=\"badge badge-warning absolute right-0 top-0 m-4\"\u003e\n          Build Time: {BUILD_TIME}\n        \u003c/div\u003e\n        \u003cdiv className=\"y-2\"\u003e\n          \u003ch2\u003eReact Condition Manager\u003c/h2\u003e\n          \u003cp\u003eCurrent Status: {status}\u003c/p\u003e\n          \u003cnav className=\"x-2\"\u003e\n            \u003cbutton className=\"btn btn-primary btn-sm\" onClick={() =\u003e setStatus('init')}\u003eset init\u003c/button\u003e\n            \u003cbutton className=\"btn btn-primary btn-sm\" onClick={() =\u003e setStatus('show')}\u003eset show\u003c/button\u003e\n            \u003cbutton className=\"btn btn-primary btn-sm\" onClick={() =\u003e setStatus('hide')}\u003eset hide\u003c/button\u003e\n          \u003c/nav\u003e\n          \u003cRcm items={[status === 'init', status === 'show', status === 'hide']}\u003e\n            \u003cdiv className=\"bg-slate-300\"\u003eHello World - init\u003c/div\u003e\n            \u003cdiv className=\"bg-slate-400\"\u003eHello World - show\u003c/div\u003e\n            \u003cdiv className=\"bg-slate-500\"\u003eHello World - hide\u003c/div\u003e\n          \u003c/Rcm\u003e\n        \u003c/div\u003e\n        \u003cdiv className=\"y-2\"\u003e\n          \u003ch2\u003eOnly one condition\u003c/h2\u003e\n          \u003cRcm items={[status === 'init']}\u003e\n            \u003cdiv className=\"bg-green-400\"\u003eHello World - init\u003c/div\u003e\n          \u003c/Rcm\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    );\n  }\n\n  export default App;\n  ```\n\n## preview\n- https://afeiship.github.io/react-condition-manager/\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/react-condition-manager/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/react-condition-manager\n[version-url]: https://npmjs.org/package/@jswork/react-condition-manager\n\n[license-image]: https://img.shields.io/npm/l/@jswork/react-condition-manager\n[license-url]: https://github.com/afeiship/react-condition-manager/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-condition-manager\n[size-url]: https://github.com/afeiship/react-condition-manager/blob/master/dist/react-condition-manager.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/react-condition-manager\n[download-url]: https://www.npmjs.com/package/@jswork/react-condition-manager\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-condition-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Freact-condition-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-condition-manager/lists"}