Material-ui: TypeError: Cannot read property 'unit' of undefined

Created on 1 Apr 2019  路  1Comment  路  Source: mui-org/material-ui


TypeError: Cannot read property 'unit' of undefined

Hey, guys! I'm a noob of React, I tried to write a dashboard with mui, help me!

  • [x] This is not a v0.x issue.
  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 馃


Render the component

Current Behavior 馃槸


TypeError: Cannot read property 'unit' of undefined
(anonymous function)
src/component/register/Steps.js:14
11 | width: '90%',
12 | },
13 | backButton: {

14 | marginRight: theme.spacing.unit,
| ^ 15 | },
16 | instructions: {
17 | marginTop: theme.spacing.unit,

Your Environment 馃寧Mac OS Mojava

| Tech | Version |
|--------------|---------|
| Material-UI | 0.20.2 |
| React | 16.8.6 |
| Browser | Chrome |
| TypeScript | No |
| etc. | |

incomplete v0.x

>All comments

Material-UI | 0.20.2

Be sure to use @material-ui/core not material-ui. You probably used some code that is written for the latest versions while using an older version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bessonov picture Bessonov  路  93Comments

gndplayground picture gndplayground  路  54Comments

darkowic picture darkowic  路  62Comments

kybarg picture kybarg  路  164Comments

tleunen picture tleunen  路  59Comments