Renders content based on a boolean condition.
The appropriate content based on the condition
Simple conditional renderer using renderIf/renderElse props. Prefer the If/IfElse components for new code — this component exists for backwards compatibility.
renderIf
renderElse
If
IfElse
import { Conditional } from '@consumidor-positivo/ts-utils/react';<Conditional condition={isLoggedIn} renderIf={<Dashboard />} renderElse={<Login />}/> Copy
import { Conditional } from '@consumidor-positivo/ts-utils/react';<Conditional condition={isLoggedIn} renderIf={<Dashboard />} renderElse={<Login />}/>
Renders content based on a boolean condition.