react-domify icon indicating copy to clipboard operation
react-domify copied to clipboard

Support for React 16

Open MiaXIA opened this issue 6 years ago • 1 comments

I used it for my project, but recently I upgraded my project to React 16, and this package has the error: "TypeError: React.createClass is not a function". I think it is because React 16 remove the function of createClass. Can we upgrade this package like declaring React.Component so that it can support React 16? Thank you!

MiaXIA avatar Mar 28 '19 01:03 MiaXIA

I simply change the way claiming React Class as class DOMify extends Component { render() { return ( <div className={this.props.className} style={this.props.style}> {transform(this.props.value)} </div> ) } } And it will works fine with React 16 (In my code, it is ^16.7.0), if you want, I can create the PR and merge it into your package to make this package works with latest React version.

MiaXIA avatar Mar 28 '19 22:03 MiaXIA