gpt4 book ai didi

javascript - 找不到变量 : "View"

转载 作者:行者123 更新时间:2023-11-28 17:06:57 24 4
gpt4 key购买 nike

初学者问题。错误表明找不到变量:“View”

我编写此代码是为了将设计集成到我的代码中,但它给出:“找不到变量:查看”我缺少什么

import React from 'react';
import {StyleSheet} from "react-native" ;




export default class MenuButton extends React.Component {
render() {
return (
<View menu={burger.menuIcon}>
</View>
)
}
}

const burger = StyleSheet.create({
menuIcon: {
color : 'rgba(255,255,255,0.0)',
top : 17 ,
height : 5 ,
width : 6 ,
position : 'absolute' ,
margin : 0,
left : 26

}});

我希望出现一个没有错误的空白屏幕

最佳答案

将 View 添加到导入中,如下所示:

import {StyleSheet,View} from "react-native" ;

关于javascript - 找不到变量 : "View",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55642567/

24 4 0
文章推荐: javascript - 在 html 中显示浏览器特定 "popups blocked"图标的内置方式?
文章推荐: javascript - jQuery 计算乘法表单输入字段
文章推荐: javascript - 在鼠标悬停时将标签添加到朝阳的中间
文章推荐: javascript -