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

'state' is not defined no-undef #682

Closed
robbporto opened this issue Sep 5, 2018 · 3 comments
Closed

'state' is not defined no-undef #682

robbporto opened this issue Sep 5, 2018 · 3 comments

Comments

@robbporto
Copy link

Hi, everyone.

I'm having a false positive when trying to declare state in a class component using react.

For example:

class ClassTeste extends Component {
  state = { loading: true } // ERROR HERE: 'state' is not defined  no-undef

  componentDidMount() {
  }

  componentDidUpdate(prevProps) {
  }
  
  render() {
    return <div>Teste</div>
  }
}
@rohan-deshpande
Copy link

rohan-deshpande commented Sep 22, 2018

Related to #529

See #529 (comment)

@croraf
Copy link

croraf commented Oct 7, 2018

Should be closed in favour of #487

@kaicataldo
Copy link
Member

Thank you for the issue. Now that @babel/eslint-parser has been released, we are making this repository read-only. If this is a change you would still like to advocate for, please reopen this in the babel/babel monorepo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants