Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Do not provide onChange prop by default #56

Merged
merged 1 commit into from
Sep 29, 2015
Merged

Do not provide onChange prop by default #56

merged 1 commit into from
Sep 29, 2015

Conversation

faergeek
Copy link
Contributor

This PR fixes #55

};

if (onChange) inputProps.onChange =
event => this.props.onChange(event.target.value);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating an anomymous function every render is not optimal. It's way better to keep the _handleChange ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just got used to use react-hot-loader and now react-transform-hmr. So I avoid assigning methods on each instance.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know when it's fixed and I'll merge

@faergeek
Copy link
Contributor Author

Fixed

tleunen added a commit that referenced this pull request Sep 29, 2015
Do not provide onChange prop by default
@tleunen tleunen merged commit fe12dd8 into tleunen:master Sep 29, 2015
@faergeek faergeek deleted the onchange-no-default branch September 29, 2015 11:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LinkState and valueLink bug
2 participants