Created
July 12, 2020 21:25
-
-
Save crypticminds/8b674e095c3489403441b948802bf130 to your computer and use it in GitHub Desktop.
Regular route without splitting
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
import React from "react"; | |
import { Route, Switch } from "react-router-dom"; | |
import Home from "./home"; | |
import Login from "./login"; | |
import Profile from "./profile"; | |
const MyComponent = () => { | |
return ( | |
<Switch> | |
<Route path="/home"> | |
<Home /> | |
</Route> | |
<Route path="/login"> | |
<Login /> | |
</Route> | |
<Route path="/profile"> | |
<Profile /> | |
</Route> | |
</Switch>) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment