react how to render something as something else code example
Example 1: if else react render in jsc
const functionalComponent=()=> {
return (
{
props.isFeatured ? (
lol
) : ("")
}
);
}
Example 2: if else render react
render() {
const isLoggedIn = this.state.isLoggedIn;
return (
{isLoggedIn ? (
) : (
)}
);
}