# @antivixen/react-show-case

> JSX component to deal with React Js conditional rendering

Latest version **0.1.6** (published 2023-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @antivixen/react-show-case
pnpm add @antivixen/react-show-case
yarn add @antivixen/react-show-case
bun add @antivixen/react-show-case
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2023-08-28 |
| First published | 2023-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 57.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | antivixen |
| Maintainers | antivixen |
| Keywords | react, show, conditional rendering, JSX |

## Links

- npm: https://www.npmjs.com/package/@antivixen/react-show-case
- Repository: https://github.com/antivixen/react-show-case
- Homepage: https://github.com/antivixen/react-show-case#readme
- Issues: https://github.com/antivixen/react-show-case/issues
- npm.io page: https://npm.io/package/@antivixen/react-show-case

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.6 (latest) — 2023-08-28
- 0.1.5 — 2023-08-28
- 0.1.4 — 2023-08-28
- 0.1.3 — 2023-08-28
- 0.1.2 — 2023-08-28
- 0.1.1 — 2023-08-28
- 0.1.0 — 2023-08-28
- 0.0.12 — 2023-08-27
- 0.0.11 — 2023-08-27
- 0.0.10 — 2023-08-27
- 0.0.9 — 2023-08-27
- 0.0.8 — 2023-08-27
- 0.0.7 — 2023-08-27
- 0.0.5 — 2023-08-27
- 0.0.4 — 2023-08-27
- … 1 more at https://npm.io/package/@antivixen/react-show-case/versions

## README

# React Show Case

JSX component to deal with conditional rendering in React Js.
Inspired by [SolidJS version](https://www.solidjs.com/docs/latest#show)

## Usage

```ts
import { Show, Fallback } from "@antivixen/react-show-case";

export const Example = () => {
  const [isAvailable, setIsAvailable] = useState(false);
  return (
    <Show when={isAvailable}>
      <h1>Some content to show</h1>
      <Fallback>
        <h1>Some content to show if when statement is false</h1>
      </Fallback>
    </Show>
  );
};
```

It's worth noting that neither the Show nor the Feedback functions are compatible with primitive values. To make use of them, you can either employ a standard ternary operator or investigate [this library](https://www.npmjs.com/package/@antivixen/andor)

---
_Source: https://npm.io/package/@antivixen/react-show-case · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
