我遵循指南form api-platform 并在初始博览会运行时出现错误
$ yarn global add expo-cli
$ expo init my-app
# When asked, choose to use the blank template
$ cd my-app
$ yarn add redux react-redux redux-thunk redux-form react-native-elements react-native-router-flux react-native-vector-icons prop-types whatwg-url buffer react-native-event-source
$npx @api-platform/client-generator https://demo.api-platform.com . --generator react-native --resource book
此后,您需要修改App.js并从此链接https://api-platform.com/docs/client-generator/react-native/#generating-a-native-app创建Route.js
并运行
expo start
我遇到一个错误
Invariant Violation: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `ListComponent`.
This error is located at:
in RCTView (at View.js:45)
in View (at ScrollView.js:976)
...
This error is located at:
in NavigationContainer (at Router.js:97)
in App (at Router.js:122)
in Router (at Router.js:8)
in RouterComponent (at App.js:34)
...
答案 0 :(得分:0)
使用旧版本的react-native-elements的api-platform / client-generator
在控制台中输入
expo install react-native-elements@0.19.1
它有效