报错页面

处理:

/**
 * @format
 */

import { AppRegistry, Text } from 'react-native';
import App from './App';
import { name as appName } from './app.json';
//正确写法
import { Component } from 'react';
import React from 'react'
//艹,傻逼,上边两行还不能写到一行去。错误写法
// import React, { Component } from 'react';

class HelloRN extends Component {
    render() {
        return (
            <Text>Hello world!</Text>
        );
    }
}

AppRegistry.registerComponent('HelloRN', () => HelloRN);

 

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐