Since we do permissions this way:
<App>
<Route path="/login" component={Permission.guest(AppLogin)} />
<Permission.auth(AppMain)>
<Route path="/" component={AppHome} />
<Route path="/trash" component={AppHome} />
</Permission.auth(AppMain)>
</App>
And that <Permission.auth(AppMain)>
isn't a valid syntax, we may have to make assign it to a variable.
const AppMainWithPermission = Permission.auth(AppMain)
which can get verbose. What if we could compose it on the go?
<Compose hoc={Permission.auth} component={AppMain}>
</Compose>
See react-hoc-compose.