
Security News
vlt 1.5.0 Adds Agent Skills Management
vlt 1.5.0 links skills from JavaScript dependencies to coding agents, with lockfile versioning and Socket data to filter out known malicious packages.
@axew/rc-if
Advanced tools
rc-if is a react component for writing if-else in render.
Install.
$ npm install @axew/rc-if
# or
$ yarn add @axew/rc-if
Example.
import { FI, If, ElseIf, Else } from '@axew/rc-if';
const App = () => {
const { data, error, loading } = useFakeFetch('http://example.com');
return (
<FI>
<h1>Title - this is always visible</h1>
<If if={loading}>
<Loading />
</If>
<ElseIf elseIf={error}>
<Error message={error} />
</ElseIf>
<Else>
<If if={data.list.length === 0}>
<Empty />
</If>
<Else>
<List dataSource={data.list} />
</Else>
</Else>
</FI>
);
};
interface RcIF extends React.SFC<{ show?: boolean }> {
If: React.SFC<{ if?: boolean }>;
ElseIf: React.SFC<{ elseIf?: boolean }>;
Else: React.SFC;
}
declare const FI: RcIF;
The following components cannot work without FI wrapping. When use in nested, the following components can also be wrap.
| Property | Description | Type | Default |
|---|---|---|---|
| show | render children or not | boolean | true |
Render when if.
| Property | Description | Type | Default |
|---|---|---|---|
| if | render children or not | boolean | - |
Render when elseIf.
| Property | Description | Type | Default |
|---|---|---|---|
| elseIf | render children or not | boolean | - |
Render when else.
FAQs
A react component for write if-else in render
We found that @axew/rc-if 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.

Security News
vlt 1.5.0 links skills from JavaScript dependencies to coding agents, with lockfile versioning and Socket data to filter out known malicious packages.

Security News
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.