我使用facebook社区开发的create-react-app创建了我的项目。
如何像使用View in create-react-app项目一样使用在expo init项目中工作的代码:
import React from 'react';
import ReactDOM from 'react-dom';
class Spalsh extends React.Component {
constructor(props) {
super();
}
render() {
return (
<View></View>
)
}
}因为在尝试添加此库时,import {View} from "react-native";运行错误
发布于 2020-12-12 01:39:23
一件事是create-react-app,另一件事是expo。Expo是react native的一个模块!cra是facebook使用React开发的一个用于创建web应用程序的模块。
如果你想要构建和APK或IOs应用程序,你必须需要react-native,为了设置开发环境,请遵循下一个教程https://reactnative.dev/docs/environment-setup
https://stackoverflow.com/questions/65255987
复制相似问题