You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of 'Presentation'.
I'm trying to use the Card element but I keep getting this error. I lifted the example from the documentation. I have an AppBar and LeftNav working fine, any insight into what I'm doing wrong is greatly appreciated.
importReactfrom'react';importCardfrom'material-ui/lib/card';importFlatButtonfrom'material-ui/lib/flat-button';classPresentationextendsReact.Component{constructor(props){super(props);}render(){return(<Card><Card.CardHeadertitle="Demo Url Based Avatar"subtitle="Subtitle"avatar="http://lorempixel.com/100/100/nature/"/><Card.CardMediaoverlay={<Card.CardTitletitle="Title"subtitle="Subtitle"/>}><imgsrc="http://lorempixel.com/600/337/nature/"/></Card.CardMedia><Card.CardTitletitle="Title"subtitle="Subtitle"/><Card.CardActions><FlatButtonlabel="Action1"/><FlatButtonlabel="Action2"/></Card.CardActions><Card.CardText>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec mattis pretium massa. Aliquam erat volutpat. Nulla facilisi.
Donec vulputate interdum sollicitudin. Nunc lacinia auctor quam sed pellentesque.
Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio.
</Card.CardText></Card>)}}exportdefaultPresentation;
It is problem of your imports. material-ui/lib/card does not export CardHeader component only Card. CardHeader is in diffrent file - material-ui/lib/card-header
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of 'Presentation'.
I'm trying to use the Card element but I keep getting this error. I lifted the example from the documentation. I have an AppBar and LeftNav working fine, any insight into what I'm doing wrong is greatly appreciated.
The text was updated successfully, but these errors were encountered: