You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
Remove create-react-class
This commit is contained in:
@@ -2,19 +2,19 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import createReactClass from 'create-react-class';
|
||||
|
||||
export default function(opts) {
|
||||
opts = opts || {};
|
||||
if (!opts.displayName) {
|
||||
opts.displayName = 'StubComponent';
|
||||
}
|
||||
|
||||
if (!opts.render) {
|
||||
opts.render = function() {
|
||||
export default function({displayName = "StubComponent", render} = {}) {
|
||||
if (!render) {
|
||||
render = function() {
|
||||
return <div>{ this.displayName }</div>;
|
||||
};
|
||||
}
|
||||
|
||||
return createReactClass(opts);
|
||||
return class extends React.Component {
|
||||
static displayName = displayName;
|
||||
|
||||
render() {
|
||||
return render();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user