Skip to content

Instantly share code, notes, and snippets.

View yogurt1's full-sized avatar
🦦

Paruyr yogurt1

🦦
View GitHub Profile
@ryanflorence
ryanflorence / rails-ey.jsx
Last active February 2, 2018 22:01
Rail-ey style routes
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={() => (