When I type View
, I expect VS Code to automatically import { View } from 'react-native';
but what is does is import { View } from 'react-native-web';
. The problem is that anything imported from 'react-native-web' creates errors and never seems to work.
防止这种情况发生的程序是什么?我厌倦了手动从"react native"导入每个元素.
另外,我使用Auto Import VS代码扩展.