Props
Name | Type | Default | Description |
---|
See also Just
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}
)
}
Name | Type | Default | Description |
---|
See also Just
Contribute on Github! Edit this section.