I'll be honest, I'm not entirely sure what you're asking. I'm assuming you're trying to get your "Something not working" example to work.
Something like this,
import * as React from 'react'
import {BrowserRouter as Router, Route, Switch } from 'react-router-dom'
export const Routes = () => (
)