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

Just

import { Just } from 'flowr';

Just has no special behaviour, it just renders it's children without any changes. Just is useful when you need to dynamically create a controlled render.

// ...
render() {
  // If we have a predicate defined, we want to render the `span`
  // only when that predicate is true. If not, just render it.

  const Wrapper = this.props.predicate ? Maybe : Just

  return (
    
// Just will ignore the props Hello, world!
) }

The above snippet is just for the sake of example. You would achieve the same outcome by using just a Maybe:

// ...
Hello, world!

Props

NameTypeDefaultDescription

See also Nothing

Contribute on Github! Edit this section.