React Component method autocompletion
It'd be nice if WebStorm provided auto completion for React Component methods. For example:
class App extends Component {
someMethod(){
self.setState({});
}
render () {}
}
In the above example for methods inherited from `React.Component` such as `self.setState`, auto completion is not provided. Can this be fixed?
Please sign in to leave a comment.
Installing React typings (`npm i @types/react`, or Settings | Languages & Frameworks | JavaScript | Libraries, Download... -> react) should help. But note that this might break React props resolving (https://youtrack.jetbrains.com/issue/WEB-29841), make sure to upgrade to the most recent WebStorm version where this issue is resolved
Thanks it worked.
Elena, great thanks!!!