Const
Renders <Then> when condition is truthy, <Else> otherwise.
<Then>
condition
<Else>
import { IfElse, Then, Else } from '@consumidor-positivo/ts-utils/react';<IfElse condition={isLoggedIn}> <Then>Welcome!</Then> <Else>Please log in.</Else></IfElse> Copy
import { IfElse, Then, Else } from '@consumidor-positivo/ts-utils/react';<IfElse condition={isLoggedIn}> <Then>Welcome!</Then> <Else>Please log in.</Else></IfElse>
A boolean, number, string, null, undefined, or a function returning one of these
Must be <Then> or <Else> components
Renders
<Then>whenconditionis truthy,<Else>otherwise.