REACT NATIVE [TypeError:未定义不是对象(正在评估“ item.type.displayName”))

时间:2018-09-17 16:28:11

标签: javascript react-native native-base

我试图使用react native和native-base创建登录页面。我确实按照文档中的说明进行了操作,但是我的编码仍然出现错误,请您帮我找出我做错的地方吗?谢谢

这是我的代码:

import React, { Component } from "react";
import { View, StatusBar } from "react-native";
import {
  Container,
  Content,
  Form,
  Item,
  Input,
  Label,
  Button,
  Text
} from "native-base";

class Customerlogin extends Component {
  render() {
    return (
      <Container>
        <View>
          <StatusBar backgroundColor="#EE5FD6" barStyle="light-content" />
        </View>
        <Content>
          <Form>
            <Item floatingLabel>
              <Label> Username </Label> <Input />
            </Item>
            <Item floatingLabel last>
              <Label> Password </Label> <Input />
            </Item>
          </Form>

          <Button rounded warning>
            <Text> Sign In </Text>
          </Button>
        </Content>
      </Container>
    );
  }
}

export default Customerlogin;

Thx b4。

0 个答案:

没有答案