Skip to content

Commit 2e74041

Browse files
committed
Merge remote-tracking branch 'origin/master' into topic/react-0.14
2 parents 6886401 + ffb8e61 commit 2e74041

File tree

15 files changed

+2442
-171
lines changed

15 files changed

+2442
-171
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# purescript-react
22

3-
[![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-lightgrey.svg)](http://github.com/paf31) ![React: 0.13.3](https://img.shields.io/badge/react-0.13.3-lightgrey.svg)
3+
[![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-lightgrey.svg)](http://github.com/paf31) ![React: 0.14](https://img.shields.io/badge/react-0.14-lightgrey.svg)
44

55
Low-level React Bindings for PureScript.
66

77
For a more high-level set of bindings, you might like to look at `purescript-thermite`.
88

99
- [Module Documentation](docs/)
1010

11-
## Installation
12-
1311
```
1412
bower install purescript-react
1513
```

docs/React.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This module defines foreign types and functions which wrap React's functionality.
44

5+
#### `TagName`
6+
7+
``` purescript
8+
type TagName = String
9+
```
10+
11+
Name of a tag.
12+
513
#### `ReactElement`
614

715
``` purescript
@@ -324,7 +332,31 @@ Create an event handler.
324332
createElement :: forall props. ReactClass props -> props -> Array ReactElement -> ReactElement
325333
```
326334

327-
Create an element from a React class.
335+
Create an element from a React class spreading the children array. Used when the children are known up front.
336+
337+
#### `createElementDynamic`
338+
339+
``` purescript
340+
createElementDynamic :: forall props. ReactClass props -> props -> Array ReactElement -> ReactElement
341+
```
342+
343+
Create an element from a React class passing the children array. Used for a dynamic array of children.
344+
345+
#### `createElementTagName`
346+
347+
``` purescript
348+
createElementTagName :: forall props. TagName -> props -> Array ReactElement -> ReactElement
349+
```
350+
351+
Create an element from a tag name spreading the children array. Used when the children are known up front.
352+
353+
#### `createElementTagNameDynamic`
354+
355+
``` purescript
356+
createElementTagNameDynamic :: forall props. TagName -> props -> Array ReactElement -> ReactElement
357+
```
358+
359+
Create an element from a tag name passing the children array. Used for a dynamic array of children.
328360

329361
#### `createFactory`
330362

docs/React/DOM.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
## Module React.DOM
22

3+
#### `IsDynamic`
4+
5+
``` purescript
6+
newtype IsDynamic
7+
= IsDynamic Boolean
8+
```
9+
310
#### `mkDOM`
411

512
``` purescript
6-
mkDOM :: String -> Array Props -> Array ReactElement -> ReactElement
13+
mkDOM :: IsDynamic -> TagName -> Array Props -> Array ReactElement -> ReactElement
714
```
815

916
#### `text`

0 commit comments

Comments
 (0)