x8react

1.0.7 • Public • Published

X8react

Rendering elements conditionally in react

Using if Statment as attributes , and only render element if condition is true

Usage

import React from 'x8react';

function Home() {
  return (
    <>

      <div if={Loading}> // render only if Loading is true
        <Loading />
      </div>

      <div if={Loading == false}> // render only if Done Loading
        {...Content}
        </div>

    </>
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i x8react

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

2.74 kB

Total Files

4

Last publish

Collaborators

  • hazem33