ReactJS和Material-UI:组件定义缺少显示名称

时间:2017-04-28 14:53:33

标签: reactjs webpack material-ui

我正在使用Material-UI测试一些React应用程序,我有这个错误:

Component definition is missing display name

import React from 'react';
import TextField from 'material-ui/TextField';
import PageBase from '../components/PageBase';

const FormPageError = () => { //HERE'S THE WARNING
return(
  <PageBase title="Formulario con validaciones"
            navigation="Application / Formulario Error">
      <form>
        <TextField
          hintText="Escriba su nombre"
          errorText="Requerido"
        />
      </form>
  </PageBase>
);
};

export default FormPageError;

有了这个错误,我在控制台中有这个:

Warning: React.createElement: 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.

我该怎么办?感谢

编辑:由于下面的评论,我编辑了代码,但我仍然收到相同的警告: enter image description here

0 个答案:

没有答案