Switch to createReactClass: views/rooms and test/components. React 16 :D
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4876f4c469
commit
70ff2bc9cd
32 changed files with 87 additions and 98 deletions
|
@ -16,8 +16,9 @@ limitations under the License.
|
|||
|
||||
import SettingsStore from "../../../src/settings/SettingsStore";
|
||||
|
||||
const React = require('react');
|
||||
const ReactDOM = require("react-dom");
|
||||
import React from 'react';
|
||||
import createReactClass from 'create-react-class';
|
||||
import ReactDOM from "react-dom";
|
||||
import PropTypes from "prop-types";
|
||||
const TestUtils = require('react-dom/test-utils');
|
||||
const expect = require('expect');
|
||||
|
@ -39,7 +40,7 @@ let client;
|
|||
const room = new Matrix.Room();
|
||||
|
||||
// wrap MessagePanel with a component which provides the MatrixClient in the context.
|
||||
const WrappedMessagePanel = React.createClass({
|
||||
const WrappedMessagePanel = createReactClass({
|
||||
childContextTypes: {
|
||||
matrixClient: PropTypes.object,
|
||||
room: PropTypes.object,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* A dummy React component which we use for stubbing out app-level components
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
import React from 'react';
|
||||
import createReactClass from 'create-react-class';
|
||||
|
||||
module.exports = function(opts) {
|
||||
opts = opts || {};
|
||||
|
@ -16,5 +16,5 @@ module.exports = function(opts) {
|
|||
};
|
||||
}
|
||||
|
||||
return React.createClass(opts);
|
||||
return createReactClass(opts);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue