Skip to content

Instantly share code, notes, and snippets.

@crypticminds
Created Jul 12, 2020
Embed
What would you like to do?
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