【发布时间】:2019-07-10 22:01:10
【问题描述】:
这里已经解决了两次,但更多的是关于如何解决它的问题。我知道如何...您可以删除 App.js。但我的问题是,App.js 是否会在打包分发后或在任何其他时间需要。如果是这样,我宁愿找到其他解决方案,而不仅仅是删除文件。
我将在 App.js 中提供代码。这是从 vue-native init 或 expo init 创建的基本文件。
看了之前的帖子: Vue native is always executing App.js instead of .vue App.vue is not working in Vue-Native application
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
【问题讨论】:
-
我发现如果要在浏览器中查看,需要App.js。
标签: expo vue-native