导入的当反应本机时出乎意料的令牌



我是对本机的新手,并且在index.android.js文件中导入基本组件的问题。我找不到问题,也找不到有关此特定问题的帖子。请帮助错。

错误说:countercomponent.android.js line 7.用**标记。

import React, { Component } from 'react';
import { AppRegistry, ListView, Text, View } from 'react-native';
export default class Counter extends Component {
    render() {
        return{
            **<View>**
                <Text>Counter component</Text>
            </View>
    };
    }
}

使用以下命令在index.android.js

中导入文件
import Counter from './app/components/CounterComponent'

尝试在返回后替换{的CC_1,类似的内容:

import React, { Component } from 'react';
import { AppRegistry, ListView, Text, View } from 'react-native';
export default class Counter extends Component {
    render() {
        return (
            <View>
                <Text>Counter component</Text>
            </View>
        );
    }
}

最新更新