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

Flip

import { Flip } from 'flowr';

Flip will flip the order of it's first two children when the predicate is true or none provided.

Flip only flips the first two children. See Reverse or Order if you want to reverse the order of all children or arrange them in a specific order.
A B C
// for predicate === true:
B A C
// for predicate === false:
A B C

Props

NameTypeDefaultDescription
whenbooltrueIf true, do the flip. If false, do nothing.

See also Reverse, Order

Contribute on Github! Edit this section.