質問編集履歴

1

importのミスを修正

2019/04/02 11:43

投稿

ratmie
ratmie

スコア18

test CHANGED
File without changes
test CHANGED
@@ -14,11 +14,11 @@
14
14
 
15
15
 
16
16
 
17
- ```
17
+ コンポーネントにテーマが設定されません。
18
18
 
19
- Uncaught TypeError: Cannot read property 'prepareStyles' of undefined
19
+ App内でcontextの値を確認すると何も入っていませんでした。
20
20
 
21
- ```
21
+
22
22
 
23
23
 
24
24
 
@@ -72,7 +72,7 @@
72
72
 
73
73
  import React, { Component } from 'react';
74
74
 
75
- import { AppBar } from 'material-ui';
75
+ import { AppBar } from '@material-ui/core';
76
76
 
77
77
 
78
78
 
@@ -148,15 +148,7 @@
148
148
 
149
149
  ### 試したこと
150
150
 
151
- 当該エラーはAppBar内で
152
151
 
153
- ```
154
-
155
- this.context.muiTheme.prepareStyles
156
-
157
- ```
158
-
159
- を参照しており、App内でcontextの値を確認すると何も入っていませんでした。
160
152
 
161
153
  また、他のAppBarを他のコンポーネントに変更しても同様でした。
162
154