Skip to content

Instantly share code, notes, and snippets.

@joelvarty
Created Sep 6, 2019
Embed
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">
<Switch>
<Route path="*" render={() => <PageRouter agility={this.props.agility} />} />
</Switch>
</main>
</div>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment