Connect with one of the following accounts


Please wait while we redirect...

Views: 2061 Ask New Question

Getting following error after migrating to material-ui 1.0

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. 
You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
On By

1 Answer

There was a problem with my imports.
I was using the following

import { ListItem, ListItemIcon, ListItemText } from '@material-ui/core/List';

Which need to be updated to

import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
On By

Answer This Question

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News