Props
Name | Type | Default | Description |
---|---|---|---|
when | bool | true | When this is true , render the first child element. If false , render the second. |
See also Maybe
import { Either } from 'flowr';
An Either
is like a regular if/else
statement When the predicate is true
, it will render the first child, otherwise it will render the second.
A
B
// for predicate === true:
A
// for predicate === false:
B
Name | Type | Default | Description |
---|---|---|---|
when | bool | true | When this is true , render the first child element. If false , render the second. |
See also Maybe
Contribute on Github! Edit this section.