質問編集履歴
5
拡張子の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
```
|
29
29
|
|
30
30
|
```javascript
|
31
|
-
// index.js
|
31
|
+
// index.js
|
32
32
|
import React from 'react'
|
33
33
|
import ReactDOM from 'react-dom'
|
34
34
|
|
4
拡張子の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
#### 各ファイル
|
16
16
|
```javascript
|
17
|
-
// favorite_box.js
|
17
|
+
// favorite_box.js.jsx
|
18
18
|
class FavoriteBox extends React.Component {
|
19
19
|
// (中略)
|
20
20
|
|
3
拡張子の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
```
|
29
29
|
|
30
30
|
```javascript
|
31
|
-
// index.js
|
31
|
+
// index.js.jsx
|
32
32
|
import React from 'react'
|
33
33
|
import ReactDOM from 'react-dom'
|
34
34
|
|
2
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,10 +32,10 @@
|
|
32
32
|
import React from 'react'
|
33
33
|
import ReactDOM from 'react-dom'
|
34
34
|
|
35
|
-
import
|
35
|
+
import FavoriteBox from './components/favorite_box.js.jsx'
|
36
36
|
|
37
37
|
ReactDOM.render(
|
38
|
-
<
|
38
|
+
<FavoriteBox/>,
|
39
39
|
document.getElementById('favorite_box')
|
40
40
|
)
|
41
41
|
|
1
package\.jsonの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -66,4 +66,27 @@
|
|
66
66
|
]
|
67
67
|
},
|
68
68
|
}
|
69
|
+
```
|
70
|
+
|
71
|
+
```json
|
72
|
+
// package.json
|
73
|
+
{
|
74
|
+
"private": true,
|
75
|
+
"scripts": {
|
76
|
+
"webpack-watch": "webpack -w",
|
77
|
+
"webpack-build": "webpack -p"
|
78
|
+
},
|
79
|
+
"devDependencies": {
|
80
|
+
"babel-core": "^6.25.0",
|
81
|
+
"babel-loader": "^6.2.4",
|
82
|
+
"babel-preset-es2015": "^6.9.0",
|
83
|
+
"babel-preset-react": "^6.11.1",
|
84
|
+
"webpack": "^1.13.1"
|
85
|
+
},
|
86
|
+
"dependencies": {
|
87
|
+
"react": "^15.2.1",
|
88
|
+
"react-dom": "^15.2.1"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
69
92
|
```
|