How to use the fluxible-router.RouteStore.storeName function in fluxible-router

To help you get started, we’ve selected a few fluxible-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github localnerve / react-pwa-reference / src / application / stores / RouteStore.js View on Github external
const transformer = createFluxibleRouteTransformer({
  actions: actionsInterface.getActions()
});

/**
 * Creates a RouteStore.
 *
 * @class
 */
export function RouteStore () {
  FluxibleRouteStore.apply(this, arguments);
}

inherits(RouteStore, FluxibleRouteStore);

RouteStore.storeName = FluxibleRouteStore.storeName;
RouteStore.handlers = FluxibleRouteStore.handlers;

/**
 * Dehydrates this object to state.
 * Transforms routes to json.
 *
 * @returns {Object} The RouteStore represented as state.
 */
RouteStore.prototype.dehydrate = function dehydrate () {
  const state = FluxibleRouteStore.prototype.dehydrate.apply(this, arguments);
  state.routes = transformer.fluxibleToJson(state.routes);
  return state;
};

/**
 * Rehydrates this object from state.
github localnerve / flux-react-example / stores / RouteStore.js View on Github external
var transformer = require('../utils').createFluxibleRouteTransformer({
  actions: require('../actions/interface')
});

/**
 * Creates a RouteStore.
 *
 * @class
 */
function RouteStore () {
  FluxibleRouteStore.apply(this, arguments);
}

inherits(RouteStore, FluxibleRouteStore);

RouteStore.storeName = FluxibleRouteStore.storeName;
RouteStore.handlers = FluxibleRouteStore.handlers;

/**
 * Dehydrates this object to state.
 * Transforms routes to json.
 *
 * @returns {Object} The RouteStore represented as state.
 */
RouteStore.prototype.dehydrate = function dehydrate () {
  var state = FluxibleRouteStore.prototype.dehydrate.apply(this, arguments);
  state.routes = transformer.fluxibleToJson(state.routes);
  return state;
};

/**
 * Rehydrates this object from state.