Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#168 #171

Merged
merged 3 commits into from
Jun 24, 2019
Merged

#168 #171

merged 3 commits into from
Jun 24, 2019

Conversation

piotrwitek
Copy link
Owner

@piotrwitek piotrwitek commented Jun 24, 2019

Description

Updated createReducer API to be lightning fast and infinitely scalable ⚡️⚡️⚡️

API was updated with a minor breaking change, now there are two methods:

  • handleAction - use only when working with string action creators as action types
const reducerTest = createReducer(initialState)
  .handleAction(
    [add, increment],
    (state, action) => state + (action.type === 'ADD' ? action.payload : 1)
  );
  • handleType - use only when working with string const as action types
const reducerTest = createReducer(initialState)
  .handleType(
    ['ADD', 'INCREMENT'],
    (state, action) => state + (action.type === 'ADD' ? action.payload : 1)
  );

Related issues:

Checklist

  • I have read CONTRIBUTING.md
  • I have linked all related issues above
  • I have rebased my branch

For bugfixes:

  • I have added at least one unit test to confirm the bug have been fixed
  • I have checked and updated TOC and API Docs when necessary

For new features:

  • I have added entry in TOC and API Docs
  • I have added a short example in API Docs to demonstrate new usage
  • I have added type unit tests with dts-jest
  • I have added runtime unit tests with dts-jest

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@piotrwitek piotrwitek changed the base branch from master to next June 24, 2019 14:15
@piotrwitek piotrwitek merged commit 97f994c into next Jun 24, 2019
@piotrwitek piotrwitek deleted the #168 branch June 24, 2019 15:53
piotrwitek added a commit that referenced this pull request Oct 17, 2019
* Updated createReducer api with new method handleType
* Updated API docs
* Released 5.0.0-0
piotrwitek added a commit that referenced this pull request Oct 20, 2019
* Updated createReducer api with new method handleType
* Updated API docs
* Released 5.0.0-0
piotrwitek added a commit that referenced this pull request Oct 28, 2019
* Updated createReducer api with new method handleType
* Updated API docs
* Released 5.0.0-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant