Skip to content

Instantly share code, notes, and snippets.

Avatar
🦦

Paruyr yogurt1

🦦
View GitHub Profile
@ryanflorence
ryanflorence / rails-ey.jsx
Last active Feb 2, 2018
Rail-ey style routes
View rails-ey.jsx
const lookup = (namespace) => {
// if you really want rails-style indirection, you'd
// need an app container that could look up modules
// by strings.
}
const Resources = ({ namespace }) => {
const Layout = lookup(namespace, 'layout')
return (
<Route path={`/${namespace}`} render={() => (