我的代码出现此错误:
export default class AddExpensePage extends Component {
render() {
return (
<Container>
<Header>
<Title>Add Expense</Title>
</Header>
<Content>
<InputGroup borderType='underline' >
<Input placeholder='Item Name' />
</InputGroup>
<Button primary> Testing </Button>
</Content>
</Container>
);
}
}
这是其官方文档中的代码:
export default class ButtonExample extends Component {
render() {
return (
<Container>
<Content>
// NativeBase default style
<Button> Click Me! </Button>
</Content>
</Container>
);
}
}
我不明白为什么会出现此错误,因为据说我不必在文本标签中包装文本“ Testing”?
答案 0 :(得分:1)