
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
react-if-else
Advanced tools
Render blocks of components using a conditional, and supply to display other blocks. Also supports using conditions to display blocks (you may consider using React-Cond instead for this case).
Install this package to your project.
Use CommonJS:
var If = require('react-if-else').If;
var ElseIf = require('react-if-else').ElseIf;
var Else = require('react-if-else').Else;
var YourComponent = React.createClass({
render: function () {
<div>
<If cond={true} className="my-conditions">
If true~~~
<h2>彼女さん募集中</h2>
<ElseIf cond={false} className="my-conditions-else-if"/>
ElseIf true~~~
<h4>逢いたくなったらまぶたを閉じる</h4>
<Else className="my-conditions-else"/>
If false~~~
<h3>出会いの数だけで別れは増える</h3>
</If>
</div>
}
});
JSFiddle: http://jsfiddle.net/tkpx7L6a/
FAQs
If/Else rendering components for React
The npm package react-if-else receives a total of 0 weekly downloads. As such, react-if-else popularity was classified as not popular.
We found that react-if-else demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.