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

Fix Transition passes through all props to children in production build #123

Merged
merged 1 commit into from Jul 21, 2017

Conversation

koba04
Copy link
Member

@koba04 koba04 commented Jul 20, 2017

Fix #107

@@ -303,7 +438,7 @@ class Transition extends React.Component {
}

const {children, ...childProps} = this.props;
Object.keys(Transition.propTypes).forEach(key => delete childProps[key]);
Object.keys(propTypes).forEach(key => delete childProps[key]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets do delete props.foo for each one manually instead, its a bit uglier but maintains the optimization

@koba04
Copy link
Member Author

koba04 commented Jul 21, 2017

@jquense Thanks! I've changed to delete the props manually and added a test for this.

Copy link
Collaborator

@jquense jquense left a comment

Choose a reason for hiding this comment

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

Wonderful thanks!

@jquense jquense merged commit 708e82e into reactjs:master Jul 21, 2017
@koba04
Copy link
Member Author

koba04 commented Jul 21, 2017

Thanks!

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.

None yet

2 participants