Skip to content

Conversation

@pfhayes
Copy link
Contributor

@pfhayes pfhayes commented Dec 15, 2017

No description provided.

@pfhayes
Copy link
Contributor Author

pfhayes commented Dec 15, 2017

Addresses #1604

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Seems legit, thanks

@pfhayes
Copy link
Contributor Author

pfhayes commented Jan 30, 2018

Any updates on this? This bug is still present in 7.6.1

@ljharb ljharb merged commit 70e8a02 into jsx-eslint:master Jan 31, 2018
@wenzelua
Copy link

The bug is still present in 7.7.0

@pfhayes
Copy link
Contributor Author

pfhayes commented Mar 22, 2018

@SlaUA can you supply an example that reproduces the issue? I have not witnessed this

@wenzelua
Copy link

Looks like I faced with cache...

@Aequitas737
Copy link

Aequitas737 commented Aug 14, 2018

Still present in 7.10.0 when the callback calls a function which references this.state.

myFunc = () => {
   this.setState({
            ...prop,
        }, () => this.doStuff());
    }

    doStuff= () => {
        console.log(this.state.asdf);
    }

Can work around this by just passing this.state into doStuff: this.doStuff(this.state)

@ljharb
Copy link
Member

ljharb commented Aug 14, 2018

@Aequitas737 altho you shouldn't put arrow functions in class fields, that seems like it should work. Can you file a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants