質問編集履歴
3
App.jsの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -424,62 +424,62 @@
|
|
424
424
|
|
425
425
|
/**
|
426
426
|
|
427
|
+
* App.js
|
428
|
+
|
429
|
+
*/
|
430
|
+
|
431
|
+
import React from 'react';
|
432
|
+
|
433
|
+
import CssBaseline from '@material-ui/core/CssBaseline';
|
434
|
+
|
435
|
+
import {createStore} from 'redux';
|
436
|
+
|
437
|
+
import {Provider} from 'react-redux';
|
438
|
+
|
439
|
+
import HeaderContainer from './containers/HeaderContainer';
|
440
|
+
|
441
|
+
import reducers from './reducers/index';
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
const store = createStore(reducers)
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
function App() {
|
450
|
+
|
451
|
+
return (
|
452
|
+
|
453
|
+
<Provider store={store}>
|
454
|
+
|
455
|
+
<CssBaseline>
|
456
|
+
|
457
|
+
<HeaderContainer />
|
458
|
+
|
459
|
+
</CssBaseline>
|
460
|
+
|
461
|
+
</Provider>
|
462
|
+
|
463
|
+
);
|
464
|
+
|
465
|
+
}
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
export default App;
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
/**
|
478
|
+
|
427
479
|
* index.js
|
428
480
|
|
429
481
|
*/
|
430
482
|
|
431
|
-
import React from 'react';
|
432
|
-
|
433
|
-
import CssBaseline from '@material-ui/core/CssBaseline';
|
434
|
-
|
435
|
-
import {createStore} from 'redux';
|
436
|
-
|
437
|
-
import {Provider} from 'react-redux';
|
438
|
-
|
439
|
-
import HeaderContainer from './containers/HeaderContainer';
|
440
|
-
|
441
|
-
import reducers from './reducers/index';
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
const store = createStore(reducers)
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
function App() {
|
450
|
-
|
451
|
-
return (
|
452
|
-
|
453
|
-
<Provider store={store}>
|
454
|
-
|
455
|
-
<CssBaseline>
|
456
|
-
|
457
|
-
<HeaderContainer />
|
458
|
-
|
459
|
-
</CssBaseline>
|
460
|
-
|
461
|
-
</Provider>
|
462
|
-
|
463
|
-
);
|
464
|
-
|
465
|
-
}
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
export default App;
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
/**
|
478
|
-
|
479
|
-
* index.js
|
480
|
-
|
481
|
-
*/
|
482
|
-
|
483
483
|
import React from 'react'
|
484
484
|
|
485
485
|
import ReactDOM from 'react-dom'
|
2
編集依頼
test
CHANGED
File without changes
|
test
CHANGED
@@ -388,10 +388,118 @@
|
|
388
388
|
|
389
389
|
* utils/actionTypes.js
|
390
390
|
|
391
|
-
/
|
391
|
+
*/
|
392
392
|
|
393
393
|
export const TOGGLE_DRAWER = 'TOGGLE_DRAWER';
|
394
394
|
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
**ーーー追記ーーー**
|
400
|
+
|
401
|
+
/**
|
402
|
+
|
403
|
+
* actions/HeaderActions.js
|
404
|
+
|
405
|
+
*/
|
406
|
+
|
407
|
+
import { TOGGLE_DRAWER } from "../utils/actionTypes";
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
export function toggleDrawer(){
|
412
|
+
|
413
|
+
return {
|
414
|
+
|
415
|
+
type: TOGGLE_DRAWER
|
416
|
+
|
417
|
+
}
|
418
|
+
|
419
|
+
}
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
/**
|
426
|
+
|
427
|
+
* index.js
|
428
|
+
|
429
|
+
*/
|
430
|
+
|
431
|
+
import React from 'react';
|
432
|
+
|
433
|
+
import CssBaseline from '@material-ui/core/CssBaseline';
|
434
|
+
|
435
|
+
import {createStore} from 'redux';
|
436
|
+
|
437
|
+
import {Provider} from 'react-redux';
|
438
|
+
|
439
|
+
import HeaderContainer from './containers/HeaderContainer';
|
440
|
+
|
441
|
+
import reducers from './reducers/index';
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
const store = createStore(reducers)
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
function App() {
|
450
|
+
|
451
|
+
return (
|
452
|
+
|
453
|
+
<Provider store={store}>
|
454
|
+
|
455
|
+
<CssBaseline>
|
456
|
+
|
457
|
+
<HeaderContainer />
|
458
|
+
|
459
|
+
</CssBaseline>
|
460
|
+
|
461
|
+
</Provider>
|
462
|
+
|
463
|
+
);
|
464
|
+
|
465
|
+
}
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
export default App;
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
/**
|
478
|
+
|
479
|
+
* index.js
|
480
|
+
|
481
|
+
*/
|
482
|
+
|
483
|
+
import React from 'react'
|
484
|
+
|
485
|
+
import ReactDOM from 'react-dom'
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
import App from './App'
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
ReactDOM.render(
|
494
|
+
|
495
|
+
<App />,
|
496
|
+
|
497
|
+
document.getElementById('root')
|
498
|
+
|
499
|
+
)
|
500
|
+
|
501
|
+
|
502
|
+
|
395
503
|
```
|
396
504
|
|
397
505
|
|
@@ -403,3 +511,9 @@
|
|
403
511
|
エラーはありません。
|
404
512
|
|
405
513
|
また、コンソールにはしっかりmobileOpenの値が出力されています。
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
**ーー追記ーー**
|
518
|
+
|
519
|
+
App.js で reducers/index.js を読み込むのをやめて、直接reducers/HeaderDrawerReducers を読み込めば適切に動作しました。
|
1
初心者マークの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -400,6 +400,6 @@
|
|
400
400
|
|
401
401
|
|
402
402
|
|
403
|
-
エラーは
|
403
|
+
エラーはありません。
|
404
404
|
|
405
405
|
また、コンソールにはしっかりmobileOpenの値が出力されています。
|