Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 772057f

Browse files
committed
Test: Drop deprecated React.createClass, React.DOM
1 parent bfee78d commit 772057f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 1.1.1
44
* Remove `react-addons-create-fragment` dependency, use `cloneElement` to specify a key manually instead.
55
* Bump to allow for React ^16.0.0
6+
* Drop deprecated React.createClass, React.DOM from test
67

78
## 1.1.0
89
* Update to Babel 6 and bump node testing version to 5.11.1

test/test.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ import React from 'react';
1111
import interpolateComponents from '../src/index';
1212

1313
describe( 'interpolate-components', () => {
14-
const input = React.DOM.input();
15-
const div = React.DOM.div();
14+
const input = <input />;
15+
const div = <div />;
1616
const link = <a href="#" />;
1717
const em = <em />;
18-
const CustomComponentClass = React.createClass( {
19-
displayName: 'CustomComponentClass',
20-
render() {
21-
return <span className="special">{ this.props.intro }{ this.props.children }</span>;
22-
}
23-
} );
18+
const CustomComponentClass = ( { children, intro } ) => (
19+
<span className="special">{ intro }{ children }</span>
20+
);
2421

2522
describe( 'with default container', () => {
2623
it( 'should return a react object with a span container', () => {

0 commit comments

Comments
 (0)