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

React: Remove uses of React.createClass in netsim #17630

Merged
merged 4 commits into from Sep 8, 2017

Conversation

islemaster
Copy link
Contributor

@islemaster islemaster commented Sep 8, 2017

More work extracted from #16861 getting us ready to update to React 15.6+. React.createClass is deprecated, and I'm slowly upgrading our components to ES6 classes.

This fifth batch is components within src/netsim.

Copy link
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

LGTM modulo one question

setSentByFilter(newFilter) {
this.setState({ currentSentByFilter: newFilter});
},
setSentByFilter = (currentSentByFilter) => this.setState({currentSentByFilter});
Copy link
Contributor

Choose a reason for hiding this comment

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

are we cool with using (still-experimental) class properties for this and state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! We've been using the Class properties transform for six months now and at least on starlabs we've been really into it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome! Yeah, they're so much cleaner than manual binding. I'mma start doing the same

@islemaster islemaster merged commit 7480308 into staging Sep 8, 2017
@islemaster islemaster deleted the react-no-createclass-netsim branch September 8, 2017 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants