
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
babel-plugin-jsx-component-showing-controll
Advanced tools
Inspired by [babel-plugin-jsx-if](https://github.com/motion/babel-transform-jsx-if).
Inspired by babel-plugin-jsx-if.
Showing current component or other component conditionally
yarn add babel-plugin-jsx-component-showing-controll -D
.babelrc
{
...
"plugins": [
...,
"jsx-component-showing-controll"
]
}
Component.js
import React, { PureComponent } from 'react'
const InLoading = () => (<div>loading...</div>) // eslint-disable-line
export default class Component extends PureComponent {
render() {
return (
<div is-show={!this.props.loading} >
current component
</div>
)
}
// conver to
// (this.props.loading ? <InLoading /> : <div>current component </div>)
}
Showing custom tag instead of InLoading
import React, { PureComponent } from 'react'
const Loading = () => (<div>loading...</div>) // eslint-disable-line
export default class Component extends PureComponent {
render() {
return (
<div is-show={!this.props.loading} show-tag="Loading">
current component
</div>
)
}
// conver to
// (this.props.loading ? <Loading /> : <div>current component </div>)
}
FAQs
Inspired by [babel-plugin-jsx-if](https://github.com/motion/babel-transform-jsx-if).
The npm package babel-plugin-jsx-component-showing-controll receives a total of 3 weekly downloads. As such, babel-plugin-jsx-component-showing-controll popularity was classified as not popular.
We found that babel-plugin-jsx-component-showing-controll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.