TypeError: Cannot read property 'root' of undefined

后端 未结 2 1926
眼角桃花
眼角桃花 2021-01-22 04:54

I\'m trying to put a BasicTable function from Material-Ui to my React.js file.
Here is my code.

 import React, { Component } from \'react\';
 import { R         


        
2条回答
  •  轮回少年
    2021-01-22 05:18

    To solve the problem("TypeError: Cannot read property 'root' of undefined "), I revised {} to {} receiving @Nandu Kalidindi advice.
    Yeah, I finally could make a table of Material-ui, but another problem came up.
    The Nav bar I made has gone to somewhere.

    I will attach the picture for it.
    [Before fix]

    [After solve the Type Error]

    Do you guys know why the kind of error happened? How could I solve the error?
    I would like to keep use the nav bar after I fix the Type error.

提交回复
热议问题