redux-actions-lite

0.1.1 • Public • Published

redux-actions-lite

Build Status codecov

redux-actions simplified

Notorious action types are overrated. There is absolutely no need for a developer to type action constants for every action - this can be done under the hood. This library offers a higher-order action creator, actionType(textDescription, ...actionCreatorArgs), which omits the first argument of createAction(type, payloadCreator, metaCreator), i.e. type, replacing it with a much more useful description parameter. You are welcome to see it for yourself.

Installation

npm i redux-actions-lite --save

Usage

import { actionType } from 'redux-actions-lite';

const dismissError = actionType('Dismissing alert directly or by timeout',
  (action) => ({ action }), ({ meta }) => meta);

const notificationMsg = actionType('Display notification',
  k => k,
  () => ({ previousAction: { meta: { timestamp: new Date() - 0 } } }));

Documentation

Readme

Keywords

Package Sidebar

Install

npm i redux-actions-lite

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

12.6 kB

Total Files

5

Last publish

Collaborators

  • andrevinsky