source:
reactapp/src/index.js@
74b8c52
Last change on this file since 74b8c52 was 4a64cf0, checked in by , 2 years ago | |
---|---|
|
|
File size: 492 bytes |
Rev | Line | |
---|---|---|
[7cb8c3c] | 1 | import ReactDOM from "react-dom/client"; |
[4a64cf0] | 2 | import { BrowserRouter, Routes, Route } from "react-router-dom"; |
[7cb8c3c] | 3 | import App from "./App"; |
[4a64cf0] | 4 | import Professor from "./Pages/Professor"; |
[7cb8c3c] | 5 | |
[4a64cf0] | 6 | const root = ReactDOM.createRoot(document.getElementById("root")); |
[7cb8c3c] | 7 | root.render( |
8 | <BrowserRouter> | |
9 | <Routes> | |
10 | <Route path="/" element={<App />}> | |
[4a64cf0] | 11 | <Route path="professor"> |
[7cb8c3c] | 12 | <Route path=":professorId" element={<Professor />} /> |
13 | </Route> | |
14 | </Route> | |
15 | </Routes> | |
16 | </BrowserRouter> | |
[4a64cf0] | 17 | ); |
Note:
See TracBrowser
for help on using the repository browser.