Skip to content

Add 'empty' #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions generated-docs/React/Basic/DOM.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ text :: String -> JSX

Create a text node.

#### `empty`

``` purescript
empty :: JSX
```

An empty node. This is often useful when you would like to conditionally
show something, but you don't want to (or can't) modify the `children` prop
on the parent node.

#### `CSS`

``` purescript
Expand Down
6 changes: 6 additions & 0 deletions src/React/Basic/DOM.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import Unsafe.Coerce (unsafeCoerce)
text :: String -> JSX
text = unsafeCoerce

-- | An empty node. This is often useful when you would like to conditionally
-- | show something, but you don't want to (or can't) modify the `children` prop
-- | on the parent node.
empty :: JSX
empty = unsafeCoerce false

-- | An abstract type representing records of CSS attributes.
foreign import data CSS :: Type

Expand Down