const path = findThePath();
class Router extends Component {
render() {
if (path === "/about") return <About />
else if (path.match(someRegex)) {
const data = parseSomePath(path);
return <Page { ...data } />
} else {
return <Default />
}
}
}
Seems as though React Router has gotten a bit complex because it's abstracted away from the concept of a webpage, such that one can use it in the browser, or React Native (which can be a number of environments).Of course, I say just buck-up and learn the damn thing, it isn't that complex... earn the "Engineer" in your job title!
Maybe I'm just an out-of-touch neckbeard these days?