letakeane / emotican-app

1 stars 4 forks source link

Refactor App component #35

Open Jeff-Duke opened 7 years ago

Jeff-Duke commented 7 years ago

In app/components/App/App.js the App component can be refactored into a pure function instead of a react class.
Something along the lines of:

const App = () => {
  <section>
    <Router>
      <Header />
       ...some routes here
      <Footer />
    </Router>
  </section>
}

Also check out the <Switch> component for react router: https://reacttraining.com/react-router/web/api/Switch