Skip to content

Instantly share code, notes, and snippets.

Created Sep 6, 2019
What would you like to do?
React Routing Tutorial
import React, { Component } from 'react';
import { Switch, Route } from 'react-router-dom'
import './App.css';
//The Agility Router
import { PageRouter } from './agility-react'
//Shared Components
import GlobalHeader from './GlobalHeader'
class App extends Component {
componentDidMount() {
render() {
return (
<div className="App">
<GlobalHeader agility={this.props.agility} />
<main className="main">
<Route path="*" render={() => <PageRouter agility={this.props.agility} />} />
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment