@jfdi/react-utils-show
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Show

Show is what conditionals should always have been in React.

Install

npm install --save @jfdi/react-utils-show

Example

import React, { useState } from "react";
import ReactDOM from "react-dom";
import { Show } from "@jfdi/react-utils-show";

const App = () => {
    const [enabled, setEnabled] = useState(false);
    return (
        <Show when={enabled}>
            {"Passed the if check"}
        </Show>
    );
};
ReactDOM.render(<App />, document.getElementById("root"));

Readme

Keywords

none

Package Sidebar

Install

npm i @jfdi/react-utils-show

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

7.61 kB

Total Files

6

Last publish

Collaborators

  • jfdijoely
  • austin_breslin
  • jonsilver
  • ayeshamanu