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

Nothing

import { Nothing } from 'flowr';

Same as Just, a Nothing has no special behavior but is useful when you need to dynamically create a controlled render.

// ...
render() {
  // Our API request may return `data` and/or `error`.
  // If we get both, display the data along with a notification about the error
  // only when the error has a message.

  const { data, error = {} } = this.props.response
  const Message = error.message ? Notification : Nothing

  return (
    
JSON.stringify(data) {error.message}
) }

Props

NameTypeDefaultDescription

See also Just

Contribute on Github! Edit this section.