JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q57703F
  • License MIT

redux api middleware for separate your api routes, api actions, and interceptors. provide state normalization, db reducer

Package Exports

  • redux-routed-api-middleware

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-routed-api-middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm npm Dependency Status devDependency Status

redux-routed-api-middleware

Predictable fetch for redux. Used normalizr.

$ npm install redux-routed-api-middleware --save
// main-api.origins.js
import { ResourceOrigin, TransportJSON } from 'redux-routed-api-middleware';



export const mainResource = ResourceOrigin({
  baseUrl: `${window.location.protocol}//${window.location.host}/api/`,
  defaultTransport: new TransportJSON()
});
// main-api.entities.js
import { schema } from 'redux-routed-api-middleware';


export const EntitySandboxComponent = new schema.Entity('sandbox_component');
// resource/components.js
import { EntitySandboxComponent } from '../main-api.entities';
import { mainResource } from '../main-api.origins';



export const resource = mainResource('/components', {}, { responseSchema: [ EntitySandboxComponent ] });



export const getUiAllComponentsAction = resource('GET');