gpt4 book ai didi

javascript - 在 index、js 和 app.js 中 react native 错误

转载 作者:行者123 更新时间:2023-11-29 23:27:57 26 4
gpt4 key购买 nike

React 有点新手我正在 index.js 和 app.js 中编写以下代码,出现此错误消息。请帮忙

index.js--[错误截图][1]

import { AppRegistry } from 'react-native';
import App from './App';

AppRegistry.registerComponent('albums', () => App);

App.js--

    import React from 'react';
import { Text } from 'react-native';

const App = () => {

return (

<Text>HEELLO WORLD</Text>

);
};
export default App;

错误找不到变量:__d ( http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:1 )

找不到变量:__d ( http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:1 )

全局代码@ http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:1:4

最佳答案

您可能需要一个文本组件之前的 View 。像这样:

import React from 'react';
import { View, Text } from 'react-native';

const App = () => (
<View>
<Text>some text</Text>
</View>
);

export default App;

关于javascript - 在 index、js 和 app.js 中 react native 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48365246/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com