質問するログイン新規登録

質問編集履歴

3

誤字修正

2020/10/27 15:08

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -87,7 +87,7 @@
87
87
  export default App;
88
88
  ```
89
89
  ##関連事項
90
- ターミナルにWarningが記されていたので、その関連ファイルもついkいします。
90
+ ターミナルにWarningが記されていたので、該当するファイルIndex.js追記します。
91
91
  #####Warning内容
92
92
  src/index.js
93
93
  Line 4:8: 'App' is defined but never used no-unused-vars
@@ -108,9 +108,6 @@
108
108
  document.getElementById('root')
109
109
  );
110
110
 
111
- // If you want to start measuring performance in your app, pass a function
112
- // to log results (for example: reportWebVitals(console.log))
113
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
114
111
  reportWebVitals();
115
112
 
116
113
  ```

2

index.jsの追記

2020/10/27 15:08

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -85,4 +85,32 @@
85
85
  }
86
86
 
87
87
  export default App;
88
+ ```
89
+ ##関連事項
90
+ ターミナルにWarningが記されていたので、その関連ファイルもついkいします。
91
+ #####Warning内容
92
+ src/index.js
93
+ Line 4:8: 'App' is defined but never used no-unused-vars
94
+
95
+ #####Index.js
96
+ ```React
97
+ import React from 'react';
98
+ import ReactDOM from 'react-dom';
99
+ import './index.css';
100
+ import App from './App';
101
+ import reportWebVitals from './reportWebVitals';
102
+ import Blog from './Blog';
103
+
104
+ ReactDOM.render(
105
+ <React.StrictMode>
106
+ <Blog />
107
+ </React.StrictMode>,
108
+ document.getElementById('root')
109
+ );
110
+
111
+ // If you want to start measuring performance in your app, pass a function
112
+ // to log results (for example: reportWebVitals(console.log))
113
+ // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
114
+ reportWebVitals();
115
+
88
116
  ```

1

renderメソッドを定義しているApp.jsの中身を追記

2020/10/27 15:06

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -57,4 +57,32 @@
57
57
  };
58
58
 
59
59
  export default Article;
60
+ ```
61
+ #####App.js
62
+ ```React
63
+ import logo from './logo.svg';
64
+ import './App.css';
65
+
66
+ function App() {
67
+ return (
68
+ <div className="App">
69
+ <header className="App-header">
70
+ <img src={logo} className="App-logo" alt="logo" />
71
+ <p>
72
+ Edit <code>src/App.js</code> and save to reload.
73
+ </p>
74
+ <a
75
+ className="App-link"
76
+ href="https://reactjs.org"
77
+ target="_blank"
78
+ rel="noopener noreferrer"
79
+ >
80
+ Learn React
81
+ </a>
82
+ </header>
83
+ </div>
84
+ );
85
+ }
86
+
87
+ export default App;
60
88
  ```