From 00162775325763c585bfbbdfe1af9a9e0170a128 Mon Sep 17 00:00:00 2001 From: Aaron Franks Date: Wed, 26 Nov 2014 23:18:10 -0800 Subject: [PATCH] Add top-level API docs section for React.createElement. --- docs/ref-01-top-level-api.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/ref-01-top-level-api.md b/docs/ref-01-top-level-api.md index 7c64e1fb..39bc37b1 100644 --- a/docs/ref-01-top-level-api.md +++ b/docs/ref-01-top-level-api.md @@ -22,6 +22,21 @@ Create a component given a specification. A component implements a `render` meth For more information about the specification object, see [Component Specs and Lifecycle](/react/docs/component-specs.html). +### React.createElement + +```javascript +function createElement( + string/ReactComponent type, + [object props], + [children ...] +) +``` + +Create and return a new ReactElement of the given type. The type argument can be either an +html tag name string (eg. 'div', 'span', etc), or a `ReactComponent` class that was created +with `React.createClass`. + + ### React.render ```javascript