0.1.6 • Published 9 months ago

@antivixen/react-show-case v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

React Show Case

JSX component to deal with conditional rendering in React Js. Inspired by SolidJS version

Usage

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

0.1.6

9 months ago

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago