I continue to get the error below in the console. I have tried implicitly returning these components, setting them as both named AND default exports and also imported them as so. Any suggestions or input would be greatly appreciated.
Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of 'Header'
AppRouter Component:
import React from 'react';
import { BrowserRouter, Route, Switch, Link, NavLink } from 'react-router-dom';
import AboutPage from '../components/AboutPage';
import ContactPage from '../components/ContactPage';
import ErrorPage from '../components/ErrorPage';
import Header from '../components/Header';
import HomePage from '../components/HomePage';
const AppRouter = () => (
<BrowserRouter>
<div>
<Header />
<Switch>
<Route path='/' component={HomePage} exact={true}/>
<Route path='/about' component={AboutPage}/>
<Route path='/contact' component={ContactPage}/>
<Route component={ErrorPage}/>
</Switch>
</div>
</BrowserRouter>
);
export default AppRouter;
Header Component:
import React from 'react';
import { NavLink } from 'react-router-dom';
const Header = () => (
<div>
<h1>FRD</h1>
<NavLink to='/' activeClassName='is-active' exact={true}>Home</NavLink>
<NavLink to='/about' activeClassName='is-active'>About</NavLink>
<NavLink to='/contact' activeClassName='is-active'>Contact</NavLink>
</div>
);
export default Header;```