Skip to content

Instantly share code, notes, and snippets.

@oneybee
Created March 5, 2018 13:39
Show Gist options
  • Save oneybee/cca22fedbaaa120b314f307fc249cf4e to your computer and use it in GitHub Desktop.
Save oneybee/cca22fedbaaa120b314f307fc249cf4e to your computer and use it in GitHub Desktop.
reactapp/src/components/App.js
import React from 'react';
import Interactive from 'react-interactive';
import { Switch, Route } from 'react-router-dom';
import Home from './Home';
import ExampleComponent from './ExampleComponent';
import PageNotFound from './PageNotFound';
import Breadcrumbs from './Breadcrumbs';
import s from '../styles/app.style';
export default function App() {
return (
<div style={s.root}>
<h1 style={s.title}>Hello</h1>
<Interactive
as="a"
href="https://github.com/oneybee/reactapp"
style={s.repoLink}
{...s.link}
>https://github.com/oneybee/reactapp</Interactive>
<nav style={s.breadcrumbs}>
<Breadcrumbs />
</nav>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/example" component={ExampleComponent} />
<Route component={PageNotFound} />
</Switch>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment