我想使用本机Material-ui组件,但在浏览器中出现此错误:
index.js:2178警告:支柱类型失败:支柱children标记为必需AppBar,但其值为undefined.
我的组件是:
import React from 'react';
import AppBar from 'material-ui/AppBar';
/**
* A simple example of `AppBar` with an icon on the right.
* By default, the left icon is a navigation-menu.
*/
const Header = () => (
<AppBar
title="Title"
iconClassNameRight="muidocs-icon-navigation-expand-more"
/>
);
export default Header;
Run Code Online (Sandbox Code Playgroud)
帮帮我理解为什么?