[Intellij Idea] Full stack code completion not working
I am writing a full stack app using express-generator and create-react-app. See the blog post here for the steps that I am following https://daveceddia.com/create-react-app-express-backend/
The problem is that is no code completion while working on the React client code. I checked under settings-frameworks-JavaScript-libraries that both the node_modules folders under project root (for backend) and under project root/client (for front end) are ticked and the scope is set correctly.
Any help much appreciated
Please sign in to leave a comment.
Please provide screenshots that show up your issues
I'm having this same issue. What I'm expecting. What is happening...
If I add types/react I get basic hints but not the full autocompletion as shown in the article above. This is what it looks like with types/react enabled...
FYI this is a React Native project.
Yes, adding @types/react is required for getting completion of React lifecycle methods - this is the expected behavior.
What do you mean by full autocompletion? what is missing namely?
I tried adding @types/react to both the project root node_modules and the react app folder but I still do not get code completion. In the example below I am typing in "com" and I expect to get the lifecycle events starting with com
My project is structured like this
project-root/package.json (this is all the npm modules for the server app). Created using express-generator
project-root/client/package.json (this is all the npm modules for the client app in react). Created using create-react-app
if you see at the bottom of screenshot, I have got @types/react in my client/package.json file.
Please follow https://youtrack.jetbrains.com/issue/WEB-27143 for updates
I might have just been impatient, everything seems to be working as anticipated now. I'm getting completion on JSX CSS and React life cycle methods. I guess I was assuming there would be parameter hints with the React lifecycle/framework methods, but that seems to be a wrong assumption.