是否可以在带有Expo的React native中使用UI套件?

时间:2019-10-12 20:53:13

标签: react-native expo

我正在尝试加载UI工具包,以跳过我自己构建UI组件的整个过程。 (尽管,是的,我是本机新手)。

但是在执行npm install并将其导入之后,问题来了:

import { View, TextInput, Button } from 'galio-framework'我得到了:

Could not find a declaration file for module 'galio-framework'. '/Users/user/FirstApp/node_modules/galio-framework/src/index.js' implicitly has an 'any' type.
  Try `npm install @types/galio-framework` if it exists or add a new declaration (.d.ts) file containing `declare module 'galio-framework';`

我尝试npm install @types/galio-framework,但是却找不到我。

在模拟器中,它告诉我检查App的渲染方法。

我如何运行它?甚至可以通过Expo运行它吗?

我的package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@eva-design/eva": "^1.2.0",
    "expo": "^35.0.0",
    "galio-framework": "^0.6.1",
    "react": "16.8.3",
    "react-dom": "16.8.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
    "react-native-ui-kitten": "^4.2.0",
    "react-native-web": "^0.11.7"
  },
  "devDependencies": {
    "babel-preset-expo": "^7.0.0"
  },
  "private": true
}

谢谢。

0 个答案:

没有答案