Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove overhead dependencies #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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