x8react
v1.0.7
Published
using if Statment as attributes
Downloads
4
Readme
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>
</>
);
}