Skip to content

Readme createActions example incorrect #172

@amit1911

Description

@amit1911

I just noticed that in the example section for createActions the following example is incorrect

expect(actionTwo('first', 'second')).to.deep.equal({
  type: 'ACTION_TWO',
  payload: ['first'], // incorrect - no array required
  meta: { second: 'second' }
});

The payload is an array with the string 'first' whereas it should be equal to just the string 'first'.
Correct version is as follows:

expect(actionTwo('first', 'second')).to.deep.equal({
  type: 'ACTION_TWO',
  payload: 'first', // correct
  meta: { second: 'second' }
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions