Skip to content

Instantly share code, notes, and snippets.

@crypticminds
Created July 12, 2020 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crypticminds/8b674e095c3489403441b948802bf130 to your computer and use it in GitHub Desktop.
Save crypticminds/8b674e095c3489403441b948802bf130 to your computer and use it in GitHub Desktop.
Regular route without splitting
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