Route loaders role in the framework is to prepare the application state for rendering, the loader should return a promise that is resolved when all actions promises have resolved.

📘

Static Component Pages

Static component pages that do not rely on actions for their state can omit the loader from their route object definition.

Example

var router = fluxapp.getRouter();
var context = fluxapp.createContext();

fluxapp.registerRoute({
  id : 'user-homepace',
  path : '/users/:id',
  handler: require('./components/users/homepage'),
  method : 'GET'
});

var request = router.build('homepage', {
  params: {
    id: 1
  }  
});

var route = router.getRoute(request.routeId);

route.loader(request, context).then(render);

👍

On to Router.build