未知道具警告反应js`iconClassNameRight`

时间:2017-02-04 13:52:40

标签: html css reactjs meteor

您好,我想知道为什么它会在控制台上发出警告

Warning: Unknown prop `iconCLassNameRight` on <div> tag. Remove this prop from the element. For details, see link fb me
    in div (created by Paper)
    in Paper (created by AppBar)
    in AppBar (created by App)
    in div (created by App)
    in MuiThemeProvider (created by App)
    in App

我正在处理的代码是meteorjs和材料ui

import React, { Component } from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import RaisedButton from 'material-ui/RaisedButton';
import AppBar from 'material-ui/AppBar';

import Player from './Player.jsx';
import TeamList from './Team-list.jsx';
import TeamStats from './Team-stats.jsx';

export default class App extends Component {
  render(){
    return (
      <MuiThemeProvider>
        <div className="container">
          <AppBar
            title="Soccer Application" iconCLassNameRight="muidocs-icon-navigation-expand-more" showMenuIconButton={false} />
            <div className="row">
              <div className="col s12 m7"> <Player /> </div>
              <div className="col s12 m5"> <TeamStats /> </div>
              <div className="col s12 m5"> <TeamList /> </div>
            </div>
          </div>

        </MuiThemeProvider>
      )
    }
  }

我想知道为什么这会引发错误。感兴趣的行在appbar组件iconClassNameRight属性中。任何帮助都会有很大的帮助。谢谢。

1 个答案:

答案 0 :(得分:1)

React中的道具区分大小写。

尝试将iconCLassNameRight(大写L)替换为iconClassNameRight(小写L)