Skip to content

Prefer a static reducer #4

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

Merged
merged 1 commit into from
Jun 13, 2018
Merged

Prefer a static reducer #4

merged 1 commit into from
Jun 13, 2018

Conversation

philipp-spiess
Copy link
Owner

Fixes #3

A static reducer will not only improve the code because it leaves less room for side effects, it will also make individual actions easier to test.

Side effects still should have access to the instance (e.g. to access refs). To enable this, all side effects will now be called with a reference to the component as the first argument.

Previous, class property reducers will still work until the 1.0.0 release to avoid making a breaking change in a minor version.

@codecov
Copy link

codecov bot commented Jun 12, 2018

Codecov Report

Merging #4 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #4   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines          61     67    +6     
  Branches       13     15    +2     
=====================================
+ Hits           61     67    +6
Impacted Files Coverage Δ
src/re.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c4fa10...9efa10d. Read the comment docs.

@philipp-spiess philipp-spiess merged commit 1a0bc2e into master Jun 13, 2018
@philipp-spiess philipp-spiess deleted the static-reducer branch June 13, 2018 19:24
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