Add type signature info to top-level API docs.
Aaron Franks committed
Dec 7, 2014 at 23:17 UTC
09cfe453b84f0ca2ad0f67d3f4ca4fd2d0288521
1 file changed
+3
-3
docs/docs/ref-01-top-level-api.md
+3
-3
@@ -14,7 +14,7 @@ redirect_from: "/docs/reference.html"
14
### React.createClass
15
16
```javascript
17
-function createClass(object specification)
17
+ReactComponent createClass(object specification)
18
```
19
20
Create a component given a specification. A component implements a `render` method which returns **one single** child. That child may have an arbitrarily deep child structure. One thing that makes components different than standard prototypal classes is that you don't need to call new on them. They are convenience wrappers that construct backing instances (via new) for you.
@@ -25,14 +25,14 @@ For more information about the specification object, see [Component Specs and Li
25
### React.createElement
26
27
```javascript
28
-function createElement(
28
+ReactElement 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
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