--- id: component-specs title: Component Specs and Lifecycle permalink: docs/component-specs.html prev: component-api.html next: tags-and-attributes.html --- ## Component Specifications When creating a component class by invoking `React.createClass()`, you should provide a specification object that contains a `render` method and can optionally contain other lifecycle methods described here. > Note: > > It is also possible to use plain JavaScript classes as component classes. These classes can implement most of the same methods, though there are some differences. For more information about these differences, please read our documentation about [ES6 classes](/react/docs/reusable-components.html#es6-classes). ### render ```javascript ReactElement render() ``` The `render()` method is required. When called, it should examine `this.props` and `this.state` and return a single child element. This child element can be either a virtual representation of a native DOM component (such as `
` or `React.DOM.div()`) or another composite component that you've defined yourself. You can also return `null` or `false` to indicate that you don't want anything rendered. Behind the scenes, React renders a `