0
votes

I have used AppBar in my React component using below mentioned code and it's throwing error like

Invariant Violation: AppBar.render(): A valid ReactComponent must be returned.

var React=require('react');
var DocumentTitle=require('react-document-title');
var Masterpage=require('./pages/Masterpage');
var App=React.createClass({

 render:function()
 {
   return(
     <DocumentTitle title='Application Tracking System'>
     <div className='App'>
        <Masterpage />
        <hr />
        {this.props.children}
      </div>
     </DocumentTitle>
   );
 }

});
module.exports=App;

and Masterpage.js contain

var React=require('react');
var AppBar =  require('material-ui/lib/app-bar');
var Masterpage=React.createClass({
  render:function()
  {
    return(
      <div>
        <AppBar  title="Application Tracking System" iconClassNameRight="muidocs-icon-navigation-expand-more" />
      </div>
    );
  }
});
module.exports=Masterpage;
1

1 Answers

0
votes

I have found the answer it's because of react 0.13.3 version it's throwing an error I have updated react 0.14.3 then it's working fine.