Skip to content

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Feb 1, 2018

Follow-up to #198

When running this codemod internally I found several additional places manually invoking lifecycles like SomeComponent.componentDidMount.apply() so the codemod has been updated to handle this case also.

So I've changed the codemod from renaming CallExpressions (eg instance.method()) to broader MemberExpressions (eg instance.method() and instance.method.apply()).

Additional tests have been added.

@bvaughn bvaughn changed the title More broadly rename MemberExpression More broadly rename MemberExpressions Feb 1, 2018
@gaearon
Copy link
Member

gaearon commented Feb 2, 2018

Good catch. I’m so glad our names are greppable and not just onMount

@bvaughn
Copy link
Contributor Author

bvaughn commented Feb 2, 2018

Oh my goodness, no kidding

@bvaughn bvaughn merged commit 549dc17 into reactjs:master Feb 2, 2018
@bvaughn bvaughn deleted the manually-invoked-mixin-methods branch February 2, 2018 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants