What's wrong with this?
import { Switch, Route, Link } from 'react-router'
<Route path='/' component={() => {
return (
<div>
<Link to='/'>Home</Link>
<Link to='/users'>Users</Link>
</div>
)
}}
/>
I got error of
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
but if I just do this it's fine
<Route path='/' component={() => {
return (
<div>
Home
</div>
)
}}
/>