在React Native 应用程序中,每个文本字符串必须包含在
以下示例代码会导致此错误:
import React from 'react';
import { View } from 'react-native';
export default function App() {
return (
Home
);
}
在此示例中,“Home”文本字符串没有包含在
要解决此错误,请如下更改代码:
import React from 'react';
import { View, Text } from 'react-native';
export default function App() {
return (
Home
);
}
如上,在