JSPM

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

Abstracted actions for redux (WIP)

Package Exports

  • redux-blueprint

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-blueprint) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

redux-blueprint

Redux abstractions for actions.

NPM

npm i -S redux-blueprint

Definitions

Action Blueprint: A function that accepts an action type creator and returns an action creator.

Action Type Creator: A function that accepts an action name and returns an action type.

Usage

Reason

When writing a redux library, it is not always a great idea to hardcode every action type as a constant. This would lead to libraries only supporting singleton implementations. If one redux library uses another one, and the action types are not namespaced, the reducers will collide and it will all blow up.

This library allows blueprints to be generated that can be later resolved to redux-actions action creators at app run time.

The name for redux-actions createAction function should technically be createActionCreator. The technical name for createBlueprint would have been createActionCreatorCreator.