Skip to content

Instantly share code, notes, and snippets.

Created Jul 12, 2020
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 (
<Route path="/home">
<Home />
<Route path="/login">
<Login />
<Route path="/profile">
<Profile />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment