{"id":24592381,"url":"https://github.com/darmody/babel-transform-jsx-component-showing-controll","last_synced_at":"2026-04-18T01:32:22.429Z","repository":{"id":78474760,"uuid":"83890985","full_name":"Darmody/babel-transform-jsx-component-showing-controll","owner":"Darmody","description":"Showing current component or other component conditionally","archived":false,"fork":false,"pushed_at":"2017-03-10T07:17:48.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T08:52:47.453Z","etag":null,"topics":["babel","conditional","jsx","plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Darmody.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-03-04T12:13:28.000Z","updated_at":"2025-02-20T15:44:49.000Z","dependencies_parsed_at":"2023-03-13T20:13:27.390Z","dependency_job_id":null,"html_url":"https://github.com/Darmody/babel-transform-jsx-component-showing-controll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Darmody/babel-transform-jsx-component-showing-controll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darmody%2Fbabel-transform-jsx-component-showing-controll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darmody%2Fbabel-transform-jsx-component-showing-controll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darmody%2Fbabel-transform-jsx-component-showing-controll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darmody%2Fbabel-transform-jsx-component-showing-controll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Darmody","download_url":"https://codeload.github.com/Darmody/babel-transform-jsx-component-showing-controll/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darmody%2Fbabel-transform-jsx-component-showing-controll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["babel","conditional","jsx","plugin"],"created_at":"2025-01-24T10:14:20.786Z","updated_at":"2026-04-18T01:32:22.411Z","avatar_url":"https://github.com/Darmody.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## babel-plugin-jsx-component-showing-controll  \n\nv1.0.7\n\nInspired by [babel-plugin-jsx-if](https://github.com/motion/babel-transform-jsx-if).  \n\nShowing current component or other component conditionally\n\n### Install\n\n`yarn add babel-plugin-jsx-component-showing-controll -D`\n\n### Usage\n\n.babelrc\n\n```\n{\n  ...\n  \"plugins\": [\n    ...,\n    \"jsx-component-showing-controll\"\n  ]\n}\n```\n\nComponent.js\n\n```jsx\nimport React, { PureComponent } from 'react'\n\n// Or require it globally\nconst InLoading = () =\u003e (\u003cdiv\u003eloading...\u003c/div\u003e) // eslint-disable-line\n\nexport default class Component extends PureComponent {\n  render() {\n    return (\n      \u003cdiv is-show={!this.props.loading} \u003e\n        current component\n      \u003c/div\u003e\n    )\n  }\n  // conver to\n  // (this.props.loading ? \u003cInLoading /\u003e : \u003cdiv\u003ecurrent component \u003c/div\u003e)\n}\n\n```\n\nShowing custom tag instead of InLoading\n\n```jsx\nimport React, { PureComponent } from 'react'\n\nconst Loading = () =\u003e (\u003cdiv\u003eloading...\u003c/div\u003e) // eslint-disable-line\n\nexport default class Component extends PureComponent {\n  render() {\n    return (\n      \u003cdiv is-show={!this.props.loading} show-tag=\"Loading\"\u003e\n        current component\n      \u003c/div\u003e\n    )\n  }\n  // conver to\n  // (this.props.loading ? \u003cLoading /\u003e : \u003cdiv\u003ecurrent component \u003c/div\u003e)\n}\n\n```\n\n### Use case\n\n* loading display\n* permission controll\n* other conditional component display case\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarmody%2Fbabel-transform-jsx-component-showing-controll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarmody%2Fbabel-transform-jsx-component-showing-controll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarmody%2Fbabel-transform-jsx-component-showing-controll/lists"}