Skip to content

Instantly share code, notes, and snippets.

@ryanjyost
Created January 4, 2020 23:17
Show Gist options
  • Select an option

  • Save ryanjyost/6be3196bf5fec6567e5c15660daa21e8 to your computer and use it in GitHub Desktop.

Select an option

Save ryanjyost/6be3196bf5fec6567e5c15660daa21e8 to your computer and use it in GitHub Desktop.
Example 12
import React from "react";
import { Route, Switch } from "react-router-dom";
import Login from "./Login"
const ROUTES = [
{ path: "/", key: "ROOT", exact: true, component: Login }, //here's the update
{
path: "/app",
key: "APP",
component: RenderRoutes,
routes: [
{
path: "/app",
key: "APP_ROOT",
exact: true,
component: () => <h1>App Index</h1>,
},
{
path: "/app/page",
key: "APP_PAGE",
exact: true,
component: () => <h1>App Page</h1>,
},
],
},
];
//...same below...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment