VsCode Intellisense react native not working - react-native

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.

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

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

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!

Related

VS Code does not suggest installed npm package

I've installed, through npm (npm install react-native-elements --save and npm i --save react-native-vector-icons) two packages in my react-native (Expo) project. But the VS Code does not suggest elements from this package and keep suggesting elements from react-native instead of react-native-elements with the same name.
Would you mind explaining to me how can I force VS code to find, suggest and import this packages.
Things I've tried:
1 - restart VS code
2 - restart computer
3 - start over again a new project and reinstall all the packages.
The following image refers to the VS Code displaying the packages correctly installed and the menu does not suggesting the same package.
I'm trying to make VS code recognize, suggest and import the installed packages through npm.
I use an extension called 'npm Intellisense' and it works great for me! It's an addon by Christian Kohler.
For some reason, I uninstalled VS code, proceed the entire configuration again and now it is working. I don't know if It is a problem with previous configuration or some VS code bug. I've done the same steps and this time it is working. Thank you Dwayne for your tip.

Vue installing error and when install package

enter image description here
and the same thing when I try to install firebase or any other package
There is no errors, just depricated packages, which you cand update in future. You need to learn how to post a question, defenetly not like that.
I feel it installed the vuejs. can you type vue --version which will tell the version.

Why does expo gives error when install native-base

When I try to get native-base and when I run the app. It gives me that error. How can I fix that. I am using expo and I installed expo-font.
PLEASE HELP!
Looks like that's a bug in the native-base package.
There is a PR that resolves this issue, but as of me writing this one - it's still not merged yet.
The only workaround is to either try to install older version of native-base, either fork the native-base package and apply in the native-base code the change which fixes the issue.
Or of course, wait... until native-base contributors accept the PR and release a new version with the fix.

How solve problem with install vue native?

When I install vue native. I get this Err.
enter image description here
I cant understand what I need to do.
I find some link about babel Requires Babel "7.0.0-0" but was loaded with "6.26.3"
install and it doesnt work.
I solve it, when I move in my created project, and make command npx babel-upgrade.
It's strange, because I was upgraded babel globaly erly

How to determine if npm package is compatible with react-native?

Is there a way to determine if a npm package is compatible with react-native ?
I read that to be usable in react-native they must have polyfill. Is this something I can look for?
For example:
https://www.npmjs.com/package/redux-persist
I am learning react-native and javascript. I was hoping to take advantage of the many existing npm packages. However unless the package has "react-native" as part of the package name it does not seem to work.
Thanks in advance,
UPDATE (8/7/2017): Have a look at Andre Staltz's (staltz/react-native-node) package which makes ALL node packages work with react native!
As I understand it, any package that is (( NOT )) DOM dependent, should work. With regard to the rt2zz/redux-persist package, I only quickly looked it over but it appears as though they support the react-native store since they provide instructions for it.
import {AsyncStorage} from 'react-native'
persistStore(store, {storage: AsyncStorage})