React createFactory

React.createFactory(type) creates and returns a function to create elements of a given type. Like React.createElement it is used when create components without JSX. It is actually returning a factory that does what createElement does.

var div = React.createElement('div');
var reactDivElement = div(props, children);

It's recommended to write your components in JSX. If for any reason you do not prefer JSX.

Back to API