我已经进行了vue-native的第一个安装过程,并且正在按照“入门”Hello world教程(https://vue-native.io/getting-started.html)进行操作,但是
App.vue
从未被执行,只有App.js
。如果我删除App.js
,就会出现错误:
"无法从“node_modules\expo\AppEntry.js”解析“../../App”"
如何解决这个问题,使其正常工作并遵循教程,没有任何问题?
文件夹结构:
App.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
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.vue
<template>
<view class="container">
<text class="text-color-primary">My Vue Native App</text>
</view>
</template>
<style>
.container {
background-color: white;
align-items: center;
justify-content: center;
flex: 1;
}
.text-color-primary {
color: blue;
}
</style>
Thank you
vue
还是react
?你是如何连接vue
的呢?你是否使用了vue-cli
来创建应用程序?我的意思是,如果按照你的入门文档操作,它能正常工作。 - Jaya