Skip to content

Conversation

@vansosnin
Copy link

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 dependency blacklist for 10 lines of code so I just replaced it with helper function.

@vansosnin vansosnin changed the title Removed overhead dependencies Remove overhead dependencies Apr 11, 2016
@shark0der
Copy link
Contributor

shark0der commented Jul 2, 2016

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);
},

@vansosnin
Copy link
Author

Thanks. Should I fix it so my pull request could be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants