react props auto complete is not working with @types/react

React autocomplete for props was working fine but I didn't get autocomplete hints for React itself.

so I downloaded @types/react to my js libraries, after doing that I got react autocomplete works fine but I lost it for props

is there a way to make both works at the same time?

0
5 comments

What PhpStorm version do you use?

0
Avatar
Permanently deleted user

PhpStorm 2018.1.6
Build #PS-181.5281.35, built on June 14, 2018

0

Works for me... What is your React version? Can you recreate the issue in a new React app created with New Project.. | React App? Can you share code snippets I can use to reproduce it?

0
Avatar
Permanently deleted user

vi'm using React v16.4.1,  the code is pretty simple I am just passing props to a component 
this.alertEr is a method

when I try to use this function on the child component it doesn't show on autocomplete


i created a new project for testing, It doesn't show autocomplete and it complains about props even I'm not using @types/react


the code I used for the new project  is here https://gist.github.com/AhmedKorim/4423d615af945b64dac91cb6e7a3519f


0

This is a known issue, not related to react typings: props completion/resolving only works for components with explicit propTypes declaration; please follow https://youtrack.jetbrains.com/issue/WEB-31785 for updates

0

Please sign in to leave a comment.