0.1.6 • Published 2 years ago

@antivixen/react-show-case v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago