Open vansosnin opened 8 years ago
Well actually you could use destructuring to get rid of extra props:
render() {
var { contentEditable, tag, dangerouslySetInnerHTML, ...props } = this.props;
elementProps = {
...props,
contentEditable: true,
dangerouslySetInnerHTML: {__html: this.state.text}
};
return React.createElement(tag, elementProps);
},
Thanks. Should I fix it so my pull request could be merged?
Hello! You use babel 6, so it seems like no need to use package
object-assign
, better use ES6. Also in my opinion there is no need to pull dependencyblacklist
for 10 lines of code so I just replaced it with helper function.