diff --git a/react-addons/react-addons-tests.ts b/react-addons/react-addons-tests.ts index cdfae12664..c7b3ffdd72 100644 --- a/react-addons/react-addons-tests.ts +++ b/react-addons/react-addons-tests.ts @@ -14,7 +14,7 @@ var PropTypesSpecification: React.Specification = { // Anything that can be rendered: numbers, strings, components or an array // containing these types. - optionalRenderable: React.PropTypes.renderable, + optionalRenderable: React.PropTypes.node, // A React component. optionalComponent: React.PropTypes.component, @@ -78,7 +78,7 @@ var HelloMessage = React.createClass({displayName: 'HelloMessage', } }); -React.renderComponent(HelloMessage({name: "John"}), mountNode); +React.render(HelloMessage({name: "John"}), mountNode); var Timer = React.createClass({displayName: 'Timer', getInitialState: function() { @@ -104,7 +104,7 @@ var Timer = React.createClass({displayName: 'Timer', } }); -React.renderComponent(Timer(null), mountNode); +React.render(Timer(null), mountNode); // TestUtils var that: React.Component; diff --git a/react/react-tests.ts b/react/react-tests.ts index 1267713c24..dab902f020 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -14,7 +14,7 @@ var PropTypesSpecification: React.Specification = { // Anything that can be rendered: numbers, strings, components or an array // containing these types. - optionalRenderable: React.PropTypes.renderable, + optionalRenderable: React.PropTypes.node, // A React component. optionalComponent: React.PropTypes.component, @@ -78,7 +78,7 @@ var HelloMessage = React.createClass({displayName: 'HelloMessage', } }); -React.renderComponent(HelloMessage({name: "John"}), mountNode); +React.render(HelloMessage({name: "John"}), mountNode); var Timer = React.createClass({displayName: 'Timer', getInitialState: function() { @@ -104,4 +104,4 @@ var Timer = React.createClass({displayName: 'Timer', } }); -React.renderComponent(Timer(null), mountNode); \ No newline at end of file +React.render(Timer(null), mountNode); \ No newline at end of file diff --git a/react/react.d.ts b/react/react.d.ts index f3547a95c5..11a783a476 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -10,17 +10,17 @@ declare module "react" { declare module React { export function createClass(specification: Specification): Factory

; - export function renderComponent

(component: Descriptor

, container: Element, callback?: () => void): Descriptor

; + export function render

(component: Descriptor

, container: Element, callback?: () => void): Descriptor

; export function unmountComponentAtNode(container: Element): boolean; - export function renderComponentToString(component: Descriptor): string; + export function renderToString(component: Descriptor): string; - export function renderComponentToStaticMarkup(component: Descriptor): string; + export function renderToStaticMarkup(component: Descriptor): string; export function isValidClass(factory: Factory): boolean; - export function isValidComponent(component: Descriptor): boolean; + export function isValidElement(component: Descriptor): boolean; export function initializeTouchEvents(shouldUseTouch: boolean): void; @@ -97,7 +97,7 @@ declare module React { number: Requireable; object: Requireable; string: Requireable; - renderable: Requireable; + node: Requireable; component: Requireable; instanceOf: (clazz: Constructable) => Requireable; oneOf: (types: any[]) => Requireable