Flux Standard Action utilities for Redux.

Overview

Looking for Maintainers

Unfortunately I (timche) don't have the required time anymore to maintain this library and give it the necessary attention. Therefore I'm looking for maintainers that are willing to take care of this library on a long-term basis.

Requirements:

  • Having knowledge of this library and open-source in general.
  • Keeping the philosophy and goals of this library.
  • Taking care of issues and pull requests.
  • If required and reasonable, working out next versions of this library with the intention to improve it with the community in mind and not for the sole purpose.
  • Knowing what's good for the library and what not (e.g. not accepting every suggestion) in order to maintain the library scope.
  • Having knowledge about the tooling (CI, build system, etc.) and the docs and maintaining them.

It's also possible to join redux-utilities, an umbrella organization of complementing redux utility libraries like this one, to take care of few or all libraries. Please let me know if you are interested in that.

Please send me an email (adress on my profile) with the subject "redux-actions" and some information about you, if you want to be a maintainer.

redux-actions

Build Status codecov npm npm

Flux Standard Action utilities for Redux

Table of Contents

Getting Started

Installation

$ npm install --save redux-actions

or

$ yarn add redux-actions

The npm package provides a CommonJS build for use in Node.js, and with bundlers like Webpack and Browserify. It also includes an ES modules build that works well with Rollup and Webpack2's tree-shaking.

The UMD build exports a global called window.ReduxActions if you add it to your page via a <script> tag. We don’t recommend UMD builds for any serious application, as most of the libraries complementary to Redux are only available on npm.

Usage

import { createActions, handleActions, combineActions } from 'redux-actions';

const defaultState = { counter: 10 };

const { increment, decrement } = createActions({
  INCREMENT: (amount = 1) => ({ amount }),
  DECREMENT: (amount = 1) => ({ amount: -amount })
});

const reducer = handleActions(
  {
    [combineActions(increment, decrement)]: (
      state,
      { payload: { amount } }
    ) => {
      return { ...state, counter: state.counter + amount };
    }
  },
  defaultState
);

export default reducer;

See the full API documentation.

Documentation

Comments
  • Looking for maintainers!

    Looking for maintainers!

    Last year @yangmillstheory and I have jumped on this library to maintain and improve it, but since then, our activity has lowered due to other priorities or interests, so we don't work that much on this project anymore like we did in the past.

    • Currently we have several open issues and pull requests which need to be handled.
    • A new major version could be released that rewrites and improves the library and adds types for Flowtype and Typescript.

    It would be great if we can find 2-3 new maintainers. If you are interested in maintaining this library, don't hesitate and give us a sign in this issue. You should also be able to work independently and with others as well. Of course @yangmillstheory and I will try to help as much as possible when needed.

    help wanted 
    opened by timche 34
  • fix #152 improve documentation

    fix #152 improve documentation

    The goal here is to improve documentation. Both the documentation and the user experience around that documentation require changes.

    • [x] Use gitbook to keep documentation style consistent across redux projects (redux and redux-saga)
    • [x] Add TOCs
    • [x] Make the docs less long and unruly
    • [x] Close #172 documentation issue
    • [x] Close #204 documentation issue
    • [x] Add a Beginner Tutorial with Demo and Installation instructions
    • [x] Use js.org so that people can access the docs via redux-actions.js.org

    New Documentation Demo

    opened by vinnymac 23
  • Introduce new function: createActions

    Introduce new function: createActions

    Allow the user to create a map of standard actions from a actionType map

    example:

    file: constants/actionTypes.js

    export const MY_FIRST_ACTION_TYPE = 'MY_FIRST_ACTION_TYPE'
    export const MY_SECOND_ACTION_TYPE = 'MY_SECOND_ACTION_TYPE'
    

    file: actions/index.js

    import { createActions } from 'redux-actions'
    import * as actionTypes from '../constants/actionTypes'
    
    const actionCreators = createActions(actionTypes)
    // { myFirstActionType: createAction('MY_FIRST_ACTION_TYPE'),  
    //   mySecondActionType: createAction('MY_SECOND_ACTION_TYPE'),  }
    
    export default actionCreators
    

    cc @acdlite

    opened by alanrsoares 19
  • implement FSA errors by setting error to true if payload is an Error obj

    implement FSA errors by setting error to true if payload is an Error obj

    Noticed this spec of FSA wasn't yet implemented, and there's an issue for it.

    This sets action.error to true if the payload is a direct instance of Error. This is the faintest touch of magic, but if it's documented, it makes sense.

    Also fixes a possible error where we're trying to set action.meta even though action is a const.

    r? @acdlite

    opened by ngokevin 19
  • Wrapping reducer in handleAction throws undefined state

    Wrapping reducer in handleAction throws undefined state

    If I wrap a reducer in handleAction I get this error:

    "Reducer "selectedReddit" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined."

    If I debug I see redux tries to get a initial state by calling the wrapped reducer with undefined state and a specific system action type. Because the type does not match the wrapped one the inner reducer never runs and no state default is created.

    If I use handleActions (m) with default state it works fine. Same function with default state in arguments and classic action-type check is also fine.

    Anyway,is handleAction usable like this? Readme doesn't really specifiy use case.

    opened by Bartvds 16
  • fix(handleAction): Add descriptive error for missing or invalid actions

    fix(handleAction): Add descriptive error for missing or invalid actions

    @yangmillstheory this might be redundant or overkill so feel free to close - but it might be helpful to folks like me to see a more descriptive error when we forget the action type (with the helpful suggestion to use creatAction or createAction(s))

    ~~I also took the liberty of adding an .editorconfig and ignoring the JetBrains .idea folder. And removing Node 5 from testing since it's past it's useful life. If any of these bother you I can quickly rebase this and take those changes out.~~

    Resolves #145.

    opened by JaKXz 15
  • Allow use in class

    Allow use in class

    Say you want to make a method equal to createAction. Currently this doesn't work very well because this isn't accessible from the payloadCreator or metaCreator.

    A simple change will make this work.

    First change actionHandler from a lamba to a normal function so it takes on the this of the Class it is assigned to.

    Second, bind this to payloadCreator and metaCreator before they are called.

    opened by ntucker 13
  • v1.0.0 Roadmap

    v1.0.0 Roadmap

    With v1.0.0 we are releasing our first version that comes with breaking changes:

    Breaking Changes:

    • [x] #115: Only omit payload if undefined
    • [x] #127: Make defaultState required when creating reducers
    • [x] #145: Fail early for non-FSA actions
    help wanted 
    opened by timche 13
  • Additional arguments for handleAction{,s} reducers

    Additional arguments for handleAction{,s} reducers

    A feature request here.

    I have a reducer which have cross-cutting concerns, basically an action logger which puts log lines in the store based on different kinds of actions. This logger needs to know about a broader part of the state than the list of log statements its reducing. By sequencing the reducers in the root reducer, the log reducer can get for example the previous and next version of the state and log accordingly.

    Having a root reducer similar to the following (using Immutable containers):

    export default (state = new Immutable.Map(), action) => (
      state
        .update('someState', s => someState(s, action))
        .update(next => next.update('log', l => log(l, action, state, next)))
    );
    

    I'd optimally want to do the following:

    const logInitialState = new Immutable.List();
    const log = handleActions({
      // Direct logging action
      [logAppend]: (state, action) => state.push(Immutable.fromJS(action.payload)),
    
      // React to some other non-logging related action, notice the extra args
      [someAction]: (state, action, prev, next) => {
        const value = next.get('someState');
        if (value === prev.get('someState')) return state;
        return state.push(Immutable.fromJS({
          type: 'someAction',
          message: 'someAction happened',
        }));
      },
    }, logInitialState);
    

    But since handleActions does not relay the extra arguments, I'm forced to generate the reducers each time and close around the extra arguments like so:

    const logInitialState = new Immutable.List();
    const log = (state, action, prev, next) => handleActions({
      // Direct logging action
      [logAppend]: () => state.push(Immutable.fromJS(action.payload)),
    
      // React to some other non-logging related action
      [someAction]: () => {
        const value = next.get('someState');
        if (value === prev.get('someState')) return state;
        return state.push(Immutable.fromJS({
          type: 'someAction',
          message: 'someAction happened',
        }));
      },
    }, logInitialState)(state, action);
    

    This is both extra verbose and inefficient. It would be great if both handleAction and handleActions returns reducers that fetch a rest spread and passes it on. I guess reduce-reducers needs to know about this as well.

    Something like the following would probably do:

    export default function handleActions(handlers, defaultState) {
      // snip
      return (state = defaultState, action, ...args) => reducer(state, action, ...args);
    }
    
    question 
    opened by myme 12
  • new feature createActions() - supports actionMap, defaultActions, and options

    new feature createActions() - supports actionMap, defaultActions, and options

    The ideas for createActions were discussed in https://github.com/acdlite/redux-actions/pull/83 so this is a result of the discussions in that PR. The ideas had diverged a bit from the original authors work so I started with a fresh slate to implement the functionality.

    Basically this is a partner to createAction like handleActions is to handleAction.

    It cleans up the code and eliminates a bit of redundant typing that also could be a source of errors.

    One change from that #83 was that I went with an array for specifying default actions rather than having a variable set of arguments in the middle of the function. I don't know that typescript can handle that and I wanted the ability to pass an optionMap at the end that might be used to tweak the process. For instance, by passing in a { prefix: 'foo/' } then the createActions will automatically prefix they types with 'foo/'. I can imagine there may be other options that tweak how actions are created so it is nice to have a mechanism in the api to support extensions.

    Here is the documentation from the readme with some examples:

    createActions(?actionMap, ?arrayDefTypes, ?optionMap)

    Create multiple actions and return an object mapping from the type to the actionCreator. This eliminates some of the repetitiveness when creating many actions.

    If actionMap is provided as first argument, an action will be created for each item in the map. The key will be used for the type. The value will be treated as follows:

    • if value is a function then it will be assumed to be the payloadCreator function
    • if value is an object then it will accept as its keys, payload and meta, both of which are functions that will serve as the payloadCreator and/or metaCreator. If payloadCreator is missing the default payloadCreator is used. If metaCreator is missing then it will not use one.
    • otherwise create a default actionCreator for the key type

    If an array of string is provided as arrayDefTypes it will be used to create default actionCreators using the string for the action type.

    If an optionMap object is supplied as last argument then it will adjust the options createActions uses in operation:

    • prefix - string, prefix all action types with this prefix, default ''

    Example: simple default actions

    import { createActions } from 'redux-actions';
    const a = createActions(['ONE', 'TWO', 'THREE']);
    
    // is equivalent to
    const a = {
      ONE: createAction('ONE'),
      TWO: createAction('TWO'),
      THREE: createAction('THREE')
    ;}
    

    Example: simple default actions with prefix

    import { createActions } from 'redux-actions';
    const a = createActions(['ONE', 'TWO', 'THREE'], { prefix: 'ns/');
    
    // is equivalent to
    const a = {
      ONE: createAction('ns/ONE'),
      TWO: createAction('ns/TWO'),
      THREE: createAction('ns/THREE')
    ;}
    

    Example: using actionMap

    import { createActions } from 'redux-actions';
    const a = createActions({
      ONE: (b, c) => ({ bar: b, cat: c }),  // payload creator
      TWO: {
        payload: (d, e) => [d, e]            // payload creator
        meta: (d, e) => ({ time: Date.now() }) // meta creator
      },
      THREE: {
        meta: f => ({ id: shortid() })
      }
    });
    
    
    // is equivalent to
    const a = {
      ONE: createAction('ONE', (b, c) => ({ bar: b, cat: c })),
      TWO: createAction('TWO',
                        (d, e) => [d, e],
                        (d, e) => ({ time: Date.now() })),
      THREE: createAction('THREE',
                          undefined,  // used default payload creator
                          f => ({ id: shortid() }))
    });
    

    Example full createActions functionality

    import { createActions } from 'redux-actions';
    const a = createActions(
      {
        ONE: (b, c) => ({ bar: b, cat: c }),  // payload creator
        TWO: {
          payload: (d, e) => [d, e]            // payload creator
          meta: (d, e) => ({ time: Date.now() }) // meta creator
        },
        THREE: {
          meta: f => ({ id: shortid() })
        }
      }, [ // arrayDefTypes creates defaultActions
        'FOUR',
        'FIVE',
        'SIX'
      ], {  // options
        prefix: 'ns/'
      }
    );
    
    // is equivalent to
    const a = {
      ONE: createAction('ns/ONE', (b, c) => ({ bar: b, cat: c })),
      TWO: createAction('ns/TWO',
                        (d, e) => [d, e],
                        (d, e) => ({ time: Date.now() })),
      THREE: createAction('ns/THREE',
                          undefined,  // used default payload creator
                          f => ({ id: shortid() })),
      FOUR: createAction('ns/FOUR'),
      FIVE: createAction('ns/FIVE'),
      SIX: createAction('ns/SIX')
    };
    
    opened by jeffbski 12
  • feat(umd): adding umd build

    feat(umd): adding umd build

    as mentioned in #87

    • added minimal webpack config based on Redux Thunk
    • support UMD build
    • added note on README

    I followed the same pattern in the Makefile, let me know if something else can be improved 😅

    opened by weslleyaraujo 12
  • Improve ES build comaptibility

    Improve ES build comaptibility

    First of all I really love this package and it is one of the must have packages for every redux stack I'm working on <3 Since I'm moving most of my projects to Vite I had some troubles with peer dependencies in this project (invariant) so I made some adjustments to make it more ES friendly and internalised the dependency.

    I also streamlined some build tooling and added some exports to the build process.

    opened by alexander-heimbuch 0
  • 'to-camel-case' pacakge introducing bug since it's not compatible with 'lodash.camelCase'

    'to-camel-case' pacakge introducing bug since it's not compatible with 'lodash.camelCase'

    Hi👋 I currently use [email protected]. I want to upgrade the package to the latest version() while it performs differently to @2.6.5 as the way to camelCase. Their differences are shown as below: to-camel-case lodash.camelCase This confused me a lot. Please show me the way to fix it. Thx😄

    opened by Rollingegg 0
  • Bump qs from 6.5.2 to 6.5.3

    Bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump shell-quote from 1.6.1 to 1.7.3

    Bump shell-quote from 1.6.1 to 1.7.3

    Bumps shell-quote from 1.6.1 to 1.7.3.

    Release notes

    Sourced from shell-quote's releases.

    v1.7.2

    • Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. (144e1c2)

    v1.7.1

    • Fix $ being removed when not part of an environment variable name. (@​Adman in #32)

    v1.7.0

    • Add support for parsing >> and >& redirection operators. (@​forivall in #16)
    • Add support for parsing <( process substitution operator. (@​cuonglm in #15)

    v1.6.3

    • Fix Windows path quoting problems. (@​dy in #34)

    v1.6.2

    • Remove dependencies in favour of native methods. (@​zertosh in #21)
    Changelog

    Sourced from shell-quote's changelog.

    1.7.3

    • Fix a security issue where the regex for windows drive letters allowed some shell meta-characters to escape the quoting rules. (CVE-2021-42740)

    1.7.2

    • Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. (144e1c2)

    1.7.1

    • Fix $ being removed when not part of an environment variable name. (@​Adman in #32)

    1.7.0

    • Add support for parsing >> and >& redirection operators. (@​forivall in #16)
    • Add support for parsing <( process substitution operator. (@​cuonglm in #15)

    1.6.3

    • Fix Windows path quoting problems. (@​dy in #34)

    1.6.2

    • Remove dependencies in favour of native methods. (@​zertosh in #21)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Wierd behavior with just not recognizing string templated reducer

    Wierd behavior with just not recognizing string templated reducer

    Title should say jest not recognizing string template reducer.

    I have my reducer defined as such (simplified from real world use case to maintain main point)

    export const setItem = createAction('@common//setItem');
    const reducer = handleActions(
        {
            [`${setItem}`]: (state, action: Action) =>
                !action.error ? action.payload : state,
           //other actions not shown
        },
        null,
    );
    

    This is a convenient way of reference the action type in sync with the defined action.

    Problem is this seems to not work properly in jest. When defined this way the action is never triggered.

    If I rewrite it to statically reference the action type

    const reducer = handleActions(
        {
            [`@common/setItem`]: (state, action: Action) =>
                !action.error ? action.payload : state,
           //other actions not shown
        },
        null,
    );
    

    This executes properly.

    Anyway have any idea how I might fix this?

    opened by lemiesz 0
Releases(v2.6.5)
  • v2.6.5(Mar 4, 2019)

  • v2.6.4(Nov 2, 2018)

  • v2.6.3(Oct 22, 2018)

  • v2.6.2(Oct 19, 2018)

  • v2.6.1(Jul 26, 2018)

  • v2.6.0(Jul 26, 2018)

  • v2.5.1(Jul 25, 2018)

  • v2.5.0(Jul 25, 2018)

  • v2.4.0(May 27, 2018)

  • v2.3.2(May 3, 2018)

  • v2.3.1(May 3, 2018)

  • v2.3.0(Mar 7, 2018)

  • v2.2.1(Jul 3, 2017)

  • v2.2.0(Jul 2, 2017)

  • v2.1.0(Jul 1, 2017)

  • v2.0.3(May 10, 2017)

  • v2.0.2(Apr 16, 2017)

    Couple of improvements; thanks to the contributors.

    • 41780a23e8ce8e7699eaf522352494883d320bbb Utilize lodash-es in es builds. (#206) @jaridmargolin
    • feb9386b76c062e17c92f73478fe6a8f1001666e Use defaultState in handleActions with empty reducer map (#203) @webholics
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Mar 5, 2017)

  • v2.0.0(Mar 4, 2017)

    This release adds the ability to create structured and namespaced action creators (https://github.com/acdlite/redux-actions/commit/a4047dbd5fad11436aaa29289d86e709445bf3a0, @yangmillstheory).

    The only backwards-incompatible change is around this behavior, and so necessitated a major version bump.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.2(Feb 25, 2017)

  • 1.2.1(Jan 26, 2017)

    Enhancements

    • remove lodash.reduce, lodash.camelCase #166 (original PR: https://github.com/acdlite/redux-actions/pull/135) 90373795a0eee8970abaf8b4feae53f38a783d6c

    This approximately halves the minified bundle size. Original credit goes to @lxe.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Dec 13, 2016)

    Mostly, this release adds a new ES2015 build in the es/ folder for tree-shaking bundlers like Webpack2 and Rollup.

    • add ES-modules build (#175) (https://github.com/acdlite/redux-actions/commit/57e6b645def104bf0e9ad476fa8e01213f446c8a) @goto-bus-stop
    • update documentation for handleActions (#173) (#174) (https://github.com/acdlite/redux-actions/commit/f623022ec026fa251d338ccb62e9572cd127c3e2) @ruszki
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Nov 23, 2016)

    We found that lots of library users were specifying null payload creators in createActions and createAction. Rather than force them into a strict paradigm of passing just undefined, we decided to continue allowing this behavior. See #170, #169.

    Also, this adds an example of how to use combineActions with createActions in the README, in response to #163.

    Fixes

    • Convert null payload creator to the identity (114115b3829bab84a01144979e885932a98c0cb8) - @yangmillstheory

    Documentation

    • combineActions example in README (6679a294f66ad6302a9e21573da9fa88d348f463) - @yangmillstheory
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Nov 21, 2016)

    With #141 we have made other libraries incompatible with redux-actions and it resulted to an unexpected behavior (#164, #167). If an action is not a FSA, handleAction should not handle it and just pass it to the next reducer. This fix will remove the FSA check to support Non-FSA.

    Fixes

    • Remove FSA check in handleAction(s) (ef4acb7e06e3ea83ea6b1b58730d40087a7f069f) - @timche
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Nov 18, 2016)

    This is our first major release. If you experience any undocumented issues, please let us know immediately in the issues or feel free to open a pull request. Any contribution is much appreciated. We try our best to ship new fix releases as fast as we can.

    From now on we are checking heavily for correct usage of this library and using invariant for throwing errors. It is a mirror of Facebooks invariant in React and makes use of the process.env.NODE_ENV value as well.

    Another big change is that the payload can only be omitted with undefined. That allows us to pass null as payload, which has been requested many times by the community. We also had a long discussion on the proper usage of null and undefined for omitting values in general. You can read it in #115 and #128.

    If you want to have a quick chat with us, tweet us @yangmillstheory or @timche_.

    BREAKING CHANGES

    • Omit payload on undefined only (#128) (aaaa1109c08aa0a342b50654831b67773d011a88) - @timche
    • Make defaultState required when creating reducers (#127) (26a9ccb6c7130a51e4b2def7d589f0908232c0ef) - @yangmillstheory
    • Enforce reducer type in handleAction (#156) (69f69ecf70b072f0e3d6d7fdf63e10c92a12fb6f) - @yangmillstheory
    • Check type of payload creator (#129) (f9bf59ef6aa7336dc1d2caa13a0da198f526fe9f) - @yangmillstheory
    • Add descriptive error for missing or invalid actions (ea04ccf6b52d45e0d11d016ddce462a5f5b93fd3) - @JaKXz

    Enhancements

    • standardize on invariant for runtime checks (227db635988357f22acfb39c2328c4ad2fa5d96e) - @yangmillstheory
    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Oct 30, 2016)

    New Features & Enhancements

    • Set error to true when payload is an Error (f0f3c942e5b7283011feaa9782b9c6bc03dc07b0) - @xiaohanzhang

    Internal Improvements

    • Rename actionHandler to actionCreator (1e818aba0befaddfa8d572d853dd45a99cbe8187) - @yangmillstheory
    • Add .editorconfig (00f936d3ba9cf6ca39dc871f0010b3630d7bb3f5) - @JaKXz
    • Remove node v5.x in travis.yml (1e48e1c05fd687d4050008d31b54b53500554f57) - @JaKXz
    • Ignore .idea folder (19e967ebfc5d61a95073171bb63ed90db105e2f4) - @JaKXz
    • Include NPM statistics with badge (59109170a97827e388e4612696f2ed709e205963) - @yangmillstheory
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Sep 1, 2016)

  • v0.11.0(Aug 19, 2016)

    New Features & Enhancements

    • Add UMD build (6675385cdbb209667504631144460b71a0eea8bc) - @timche
    • Add createActions: create multiple action creators at once (812d5f208f941c181b716bdb9fe524235ae51e96) - @yangmillstheory

    Internal

    • Change actionCreator to payloadCreator for better naming (e7bdb2f6109ec196ce097bccd7026bf1497a1643) - @yangmillstheory
    • Refactor Build Process (d47a7855da450045539d607acfaafc7336b2c353) - @timche
    • Simplify return logic; remove typeof check (1dc2449e1f10787f47efb3ab94f745c16fb63a56) - @yangmillstheory
    • Simplify handleActions (5e78f252ed778ec2118ed7f01fdc8e973330bdf6) - @yangmillstheory
    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Jul 9, 2016)

  • v0.10.0(Jun 8, 2016)

    Fixes

    • createAction should adhere to doc contract regarding errors (79c68635fb1524c1b1cf8e2398d4b099b53ca8de) - @SPARTAN563
    • Use flux-standard-action dependency for test only (80f6dfbf1f7644b2eff458ad5b9441ab824cf9b6) - @albertogasparin
    • Make payload optional (as per FSA spec) (588692d75c507215a2d33343159bc73c8adbd8fe) - @jmortlock

    New features & enhancements

    • Add support for default or initial state to handleAction (626bf59fe37f1e2b7259ec040d2a6c9b92c85689) - @seniorquico
    • Use action function as handleAction(s) type param (d1aa7d6026e73433808337e10ec03f8df3bd78a6) - @nikita-graf

    General

    • Remove .npmignore and just publish lib files (b0ff0442e44b16b14b12497b630b59f6479fff31) - @sorrycc
    Source code(tar.gz)
    Source code(zip)
Owner
Redux Utilities
Useful utilities to build Redux based applications
Redux Utilities
A mock store for testing Redux async action creators and middleware.

redux-mock-store A mock store for testing Redux async action creators and middleware. The mock store will create an array of dispatched actions which

Redux 2.5k Jan 1, 2023
Helper to create less verbose action types for Redux

Action Typer Helper to create slightly less verbose redux action types. Uses ES6 Proxies! Highly Performant: Proxy is only run once at startup. Includ

Alister Norris 58 Nov 23, 2022
DevTools for Redux with hot reloading, action replay, and customizable UI

Redux DevTools Developer Tools to power-up Redux development workflow or any other architecture which handles the state change (see integrations). It

Redux 13.3k Jan 1, 2023
React with Redux, action, dispatch, reducer, store setup and guide

This Project has Snippets for react with redux steup, process and how to implemenntation details src->components->HomeButtons has old approach src->co

Mohib Khan 1 Nov 22, 2021
Redux Tutorial - share my experience regarding redux, react-redux and redux-toolkit

Redux Tutorial 1. Introduction to Redux 1.1 What is Redux & why Redux? A small JS Library for managing medium/large amount of states globally in your

Anisul Islam 36 Dec 29, 2022
Skeleton React App configured with Redux store along with redux-thunk, redux persist and form validation using formik and yup

Getting Started with React-Redux App Some Configrations Needed You guys need to modify the baseUrl (path to your server) in the server.js file that is

Usama Sarfraz 11 Jul 10, 2022
A Higher Order Component using react-redux to keep form state in a Redux store

redux-form You build great forms, but do you know HOW users use your forms? Find out with Form Nerd! Professional analytics from the creator of Redux

Redux Form 12.6k Jan 3, 2023
redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state.

redux-immutable redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state. When Redux creat

Gajus Kuizinas 1.9k Dec 30, 2022
A chart monitor for Redux DevTools https://www.npmjs.com/package/redux-devtools-chart-monitor

Redux DevTools Chart Monitor This package was merged into redux-devtools monorepo. Please refer to that repository for the latest updates, issues and

Redux 293 Nov 13, 2022
A simple app for study react with redux, redux saga and typescript.

React com Redux, Redux-Saga e TypeScript. ?? Uma aplicação simple para entender o funcionamento do Redux e a melhor maneira de utiliza-lo junto com o

João Marcos Belanga 1 May 24, 2022
Redux - Create forms using Redux And React

Exercício de fixação Vamos criar formulários utilizando Redux! \o/ Antes de inic

Márcio Júnior 2 Jul 21, 2022
A lightweight state management library for react inspired by redux and react-redux

A lightweight state management library for react inspired by redux and react-redux

null 2 Sep 9, 2022
Official React bindings for Redux

React Redux Official React bindings for Redux. Performant and flexible. Installation Using Create React App The recommended way to start new apps with

Redux 22.5k Jan 1, 2023
Ruthlessly simple bindings to keep react-router and redux in sync

Project Deprecated This project is no longer maintained. For your Redux <-> Router syncing needs with React Router 4+, please see one of these librari

React Community 7.9k Dec 30, 2022
The official, opinionated, batteries-included toolset for efficient Redux development

Redux Toolkit The official, opinionated, batteries-included toolset for efficient Redux development (Formerly known as "Redux Starter Kit") Installati

Redux 8.9k Dec 31, 2022
Thunk middleware for Redux

Redux Thunk Thunk middleware for Redux. npm install redux-thunk yarn add redux-thunk Note on 2.x Update Most tutorials today assume that you're using

Redux 17.5k Dec 31, 2022
Logger for Redux

Logger for Redux Now maintained by LogRocket! LogRocket is a production Redux logging tool that lets you replay problems as if they happened in your o

null 5.7k Jan 1, 2023
Selector library for Redux

Reselect Simple “selector” library for Redux (and others) inspired by getters in NuclearJS, subscriptions in re-frame and this proposal from speedskat

Redux 18.8k Dec 27, 2022
An alternative side effect model for Redux apps

redux-saga redux-saga is a library that aims to make application side effects (i.e. asynchronous things like data fetching and impure things like acce

Redux-Saga 22.4k Jan 5, 2023