0
私は物質的なUIタブを使用しています。 何らかの理由で私は受け取っています反応物質UI警告タブは子としてのタブコンポーネントのみを受け入れます
警告:タブは子としてのみタブコンポーネントを受け入れます。
Found function (props, context, updater) {
// This constructor gets overridden by mocks. The argument is used
// by mocks to assert on what gets mounted.
if (process.env.NODE_ENV !== 'production') {
process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: fb.me/react-legacyfactory') : void 0;
// Wire up auto-binding
if (this.__reactAutoBindPairs.length) {
bindAutoBindMethods(this);
}
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
this.state = null;
私は
私のコードに直面していますこの警告は、警告が言うように、このタブ
<Link to="ItemPreview"> <Tab label="Content"></Tab></Link>
からのリンクタグを削除する必要があり、この
return (
<MuiThemeProvider>
<div className="background">
<Header/>
<div className="container">
<Tabs>
<Tab label="Profile" onActive={this.Profile.bind(this)}>
<div>
<Profile/>
//this is children class
</div>
</Tab>
<Tab label="Downloads" >
<div>
{
data.map((detail)=> {
return <DataContainer item={detail}
ViewItem = {this.productData.bind(this)}
/>
})
}
</div>
</Tab>
<Link to="ItemPreview"> <Tab label="Content">
</Tab></Link>
</Tabs>
</div>
<Sidebar productname={productspecificdata}/>
</div>
</MuiThemeProvider>
なぜそれが来ているのですか –
警告を受け取った理由を説明するために回答を編集しました。 – Aus
おかげで兄弟.... –