回答編集履歴
1
修正
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
</head>
|
41
41
|
<body>
|
42
42
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
43
|
-
<div id="root"></div>
|
43
|
+
<div id="root"></div>★ここ!
|
44
44
|
<!--
|
45
45
|
This HTML file is a template.
|
46
46
|
If you open it directly in the browser, you will see an empty page.
|
@@ -62,13 +62,13 @@
|
|
62
62
|
import { App } from './App';
|
63
63
|
import reportWebVitals from './reportWebVitals';
|
64
64
|
|
65
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
65
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));★rootというIDを取得!
|
66
66
|
|
67
|
-
root.render(
|
67
|
+
root.render( ★ここで表示!
|
68
68
|
|
69
69
|
<React.StrictMode>
|
70
70
|
<BrowserRouter>
|
71
|
-
<App />
|
71
|
+
<App /> ★Appというコンポーネントを表示!
|
72
72
|
</BrowserRouter>
|
73
73
|
</React.StrictMode>
|
74
74
|
|
@@ -96,7 +96,7 @@
|
|
96
96
|
return (
|
97
97
|
<div className="App">
|
98
98
|
<Routes>
|
99
|
-
<Route path="/" element={<Home />} />
|
99
|
+
<Route path="/" element={<Home />} />★パスとコンポーネントを指定する
|
100
100
|
<Route path="customer" element={<Customer />} />
|
101
101
|
<Route path="product" element={<Product />} />
|
102
102
|
</Routes>
|