Skip to content

Require state to be Equatable #26

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 4 commits into from
Jan 22, 2020
Merged

Conversation

StevenLambion
Copy link
Owner

The PR requires the state to be equatable. This allows SwiftDux to perform better change tracking and reduces the need of Connectable.updateWhen(action:).

Work Performed

  • Added Equatable to StateType
  • Changed State type alias name on Connectable to Props to reduce naming collisions.
  • Fixed equatable support for OrderedState.

@codecov-io
Copy link

codecov-io commented Jan 21, 2020

Codecov Report

Merging #26 into master will decrease coverage by 0.09%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #26     +/-   ##
=========================================
- Coverage   77.57%   77.47%   -0.1%     
=========================================
  Files          19       19             
  Lines         486      484      -2     
=========================================
- Hits          377      375      -2     
  Misses        109      109
Impacted Files Coverage Δ
Sources/SwiftDux/Action/ActionSubscriber.swift 92.85% <ø> (ø) ⬆️
...wiftDuxExtras/Persistence/JSONStatePersistor.swift 66.66% <ø> (ø) ⬆️
Sources/SwiftDux/Middleware/Middleware.swift 100% <ø> (ø) ⬆️
Sources/SwiftDux/State/IdentifiableState.swift 0% <ø> (-33.34%) ⬇️
...es/SwiftDuxExtras/Persistence/StatePersistor.swift 84.61% <ø> (ø) ⬆️
Sources/SwiftDux/Store/StoreReducer.swift 100% <ø> (ø) ⬆️
Sources/SwiftDux/Store/StoreActionDispatcher.swift 31.57% <0%> (ø) ⬆️
Sources/SwiftDux/Store/Store.swift 94% <100%> (ø) ⬆️
Sources/SwiftDux/State/OrderedState.swift 81.45% <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 0a86fc4...70386fe. Read the comment docs.

@StevenLambion StevenLambion merged commit 001d5d8 into master Jan 22, 2020
@StevenLambion StevenLambion deleted the features/equatable-state branch November 10, 2020 02:49
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.

2 participants