-
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): Updated create-react-app-typescript example to use r…
…eact-router-dom v6
- Loading branch information
Showing
5 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import type { ReactElement } from "react"; | ||
import { Route, Switch } from "react-router-dom"; | ||
import { Routes, Route } from "react-router-dom"; | ||
|
||
import Layout from "components/Layout"; | ||
import Home from "components/Home"; | ||
import Route1 from "components/Route1"; | ||
import Layout from "./components/Layout"; | ||
import Home from "./components/Home"; | ||
import Route1 from "./components/Route1"; | ||
|
||
export default function App(): ReactElement { | ||
return ( | ||
<Layout> | ||
<Switch> | ||
<Route path="/" exact component={Home} /> | ||
<Route path="/route-1" component={Route1} /> | ||
</Switch> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="route-1" element={<Route1 />} /> | ||
</Routes> | ||
</Layout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters