flowr

  • Docs
  • Examples
Docs Menu
  • Getting started
  • Conditionals
    • Maybe
    • Either
    • Flip
    • Reverse
    • Order
    • One
    • Some
    • Constant
    • Just
    • Nothing
    • Pure
  • Schedulers
    • Await
    • Stream
    • Delay
    • Debounce
    • Throttle

Conditionals

A set of components to achieve conditional constructs
NamePropsDescription
MaybewhenRenders it's children only if when is true
EitherwhenIf when is true it renders the first child, otherwise it renders the second
FlipwhenFlips the order of the first two children
ReversewhenReverses the order of all its children
OrdersortRe-orders the children in the order provided through sort
OneatRenders only the child at the specified index
SomeatRenders only the children at the specified indices if they exist
Constant*Will render only once, never updating the state of it's children (shouldComponentUpdate -> false)
Pure*Will re-render only when the passed props have changed (PureComponent)
Just*Just renders it's children, nothing special, good for dynamic rendering
Nothing*Renders nothing

Contribute on Github! Edit this section.