Cómo vincular a un componente diferente en Reactjs sin React Router

const showComponent = (route, component) => {
  return window.location.pathname === route ? component : null
}
Stupid Swiftlet