Skip to content

Commit 0bd6bda

Browse files
committed
Merge pull request #2615 from af/createElement-docs
Add top-level API docs section for React.createElement.
1 parent bfaddf4 commit 0bd6bda

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/docs/ref-01-top-level-api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ Create a component given a specification. A component implements a `render` meth
2222
For more information about the specification object, see [Component Specs and Lifecycle](/react/docs/component-specs.html).
2323

2424

25+
### React.createElement
26+
27+
```javascript
28+
function createElement(
29+
string/ReactComponent type,
30+
[object props],
31+
[children ...]
32+
)
33+
```
34+
35+
Create and return a new ReactElement of the given type. The type argument can be either an
36+
html tag name string (eg. 'div', 'span', etc), or a `ReactComponent` class that was created
37+
with `React.createClass`.
38+
39+
2540
### React.render
2641

2742
```javascript

0 commit comments

Comments
 (0)