4

I am facing the problem. I am not getting intellisense of properties onPress onLongPress, paddingHorizontal, paddingVertial even in import when I type Touch then expected Suggestion will be Touchable, TouchableOpacity etc no any suggestion working in react native in vscode.

3 Answers 3

17

If anyone still look for a solution, here, install this npm package @types/react-native by typing in terminal:

npm install --save @types/react-native

This is where I found the solution

Sign up to request clarification or add additional context in comments.

Comments

0

So i found an easy solution to this. All you have to do is change your language mode from JavaScript to JavaScript React.

But that only fixes the auto complete issue, to also fix the auto import you can install this vs code extension called npm Intellisense by Christian Kohler. Link: https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense

Comments

-4

You will need to install an extension in VsCode to get that functionality.

vscode-react-native

To install and use the extension, just follow the steps provided from that github repository.

Happy coding!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.