Q: Does anyone know what this JavaScript ES6 feature is called? It's a technique of applying a prefix to identified names. Like this:
var { Router,
Route,
IndexRoute,
IndexLink,
hashHistory,
Link } = ReactRouter;
It saves me having to write long code. Example:
I can write this in React:
<Route path="/acc" component={CLAccounts} />
<Route path="/acc/:year" component={CLAccounts} />
<Route path="/acc/:year/:month" component={CLAccounts} />
Instead of this:
<ReactRouterRoute path="/acc" component={CLAccounts} />
<ReactRouterRoute path="/acc/:year" component={CLAccounts} />
<ReactRouterRoute path="/acc/:year/:month" component={CLAccounts} />