Breaking API Changes:
API Changes:
Other:
Other:
- Removed old deployment targets and support for Swift versions prior to 5.5. Version 6.2 and newer now require macOS 10.13, iOS 12, tvOS 12, watchOS 4. (#509) -- @DivineDominion
Released: 2023-01-06
Other:
- Replaced
open func
withpublic func
in extensions toStore
because they cannot be overridden anyway (#491) - @maksimgromov - Add tests to clarify initial state dispatch (#485) - @DivineDominion
Released: 2021-05-09
API Changes:
- Deprecate
StateType
protocol requirement (#462) - @mjarvis
Other:
- Fix bug where automaticallySkipsRepeats is ignored when subscribing on generic
S: StoreType
(#463) - @mjarvis - Fix typo in error messaging (#470) - @hkellaway
Released: 2020-10-01
Breaking API Changes:
- Drop support for Swift 3.2, 4.0, and 4.1. (#418) - @DivineDominion
- Drop support for iOS 8 (#447) - @DominicSchiller-IBM-CIC
API Changes:
- Add capability to mutate
Middleware
after store creation. (#427) - @mjarvis
Other:
- Add key paths to subscription select (#415) - @djtech42
- Make isDispatching of Store atomic (#341, #446) - @zhongwuzw, @basememara
Released: 2019-06-30
Breaking API Changes:
-
Remove
StandardAction
andStandardActionConvertible
(#270) - @mjarvis- The existence of
StandardAction
andStandardActionConvertible
is somewhat confusing to new users, and does not have a direct use case within the core ReSwift library. Therefore, it has been moved to ReSwift-Recorder where it belongs. - If you're using
StandardAction
in your project withoutReSwift-Recorder
, you can copy the old implementation into your project as a middle ground while you migrate away from its usage.
- The existence of
-
Make Store's state setter private (#354) - @mokagio
- Removes the ability to directly set
state
by making itprivate(set)
. This prevents users from bypassing reducers and middleware. All mutation of the state must occur through the normalAction
&Reducer
methods. - This deprecates the usage of
ReSwift-Recorder
. Changes may be made to that library in the future in order to support this change.
- Removes the ability to directly set
Other:
- Resolve Xcode 10.2 warnings with Swift 4.2.2 and 5.0 (#397) - @mjarvis
- Update Swift Package Manager support (#403, #411) - @Dschee, @hoemoon
Released: 03/21/2019
- Fix 4.1.0 regression with
automaticallySkipsRepeats
when selecting Equatable state in Non-Equatable root state (#399) - @djtech42
Released: 03/21/2019
API Changes:
-
Deprecate
StandardAction
andStandardActionConvertible
- @mjarvis- These have been moved to https://github.com/ReSwift/ReSwift-Recorder since they are unnecessary for the base use of ReSwift
-
Deprecate
ActionCreator
andAsyncActionCreator
(#391) - @mjarvis- These are deprecated in favor of https://github.com/ReSwift/ReSwift-Thunk
Other:
- Add Subscription
skip(when:)
andonly(when:)
(#242) - @mjarvis - Add
automaticallySkipsRepeats
configuration option to Store initializer (#262) - @DivineDominion - Improve subscription & state update performance (#325) - @mjarvis
- Enable build settings "Allow app extension API only" (#328) - @oradyvan
- Open
Subscription<State>
to allow external extensions (#383) - @mjarvis - Update project to Swift 4.2 (#256, #335, #374) - @mjarvis, @DivineDominion
Released: 12/19/2017
Other:
- Fix retain cycle in SubscriptionBox (#278) - @mjarvis, @DivineDominion
- Fix bug where using skipRepeats with optional substate would not notify when the substate became nil https://github.com/ReSwift/ReSwift/commit/55655098889ccb9adb716403544926dea8e79682 - @Ben-G
- Add automatic skipRepeats for Equatable substate selection (#300) - @JoeCherry
Released: 4/19/2017
Breaking API Changes:
-
Introduced a new Subscription API (#203) - @Ben-G, @mjarvis, @DivineDominion
-
The subscription API provides basic operators, such as
skipRepeats
(skip calls tonewState
unless state value changed) andselect
(sub-select a state). -
This is a breaking API change that requires migrating existing subscriptions that sub-select a portion of a store's state:
-
Subselecting state in 3.0.0:
store.subscribe(subscriber) { ($0.testValue, $0.otherState?.name) }
-
Subselecting state in 4.0.0:
store.subscribe(subscriber) { $0.select { ($0.testValue, $0.otherState?.name) } }
-
-
For any store state that is
Equatable
or any sub-selected state that isEquatable
,skipRepeats
will be used by default. -
For states/substates that are not
Equatable
,skipRepeats
can be implemented via a closure:store.subscribe(subscriber) { $0.select { $0.testValue }.skipRepeats { return $0 == $1 } }
-
-
Reducer type has been removed in favor of reducer function (#177) - Ben-G
-
Here's an example of a new app reducer, for details see the README:
func counterReducer(action: Action, state: AppState?) -> AppState { var state = state ?? AppState() switch action { case _ as CounterActionIncrease: state.counter += 1 case _ as CounterActionDecrease: state.counter -= 1 default: break } return state }
-
-
dispatch
functions now returnVoid
instead ofAny
(#187) - @Qata- The return type has been removed without any replacement, since the core team did not find any use cases of it. A common usage of the return type in redux is returning a promise that is fulfilled when a dispatched action is processed. While it's generally discouraged to disrupt the unidirectional data flow using this mechanism we do provide a
dispatch
overload that takes acallback
argument and serves this purpose.
- The return type has been removed without any replacement, since the core team did not find any use cases of it. A common usage of the return type in redux is returning a promise that is fulfilled when a dispatched action is processed. While it's generally discouraged to disrupt the unidirectional data flow using this mechanism we do provide a
-
Make
dispatch
argument in middleware non-optional (#225) - @dimazen, @mjarvis, @Ben-G -
Middleware
now has a generic type parameter that is used for thegetState
method and matches the Store'sState
type. This allows accessing the state in middleware code without type casting (#226) - @mjarvis
Other:
- Extend
StoreType
with substate selector subscription (#192) - @mjarvis - Add
DispatchingStoreType
protocol for testing (#197) - @mjarvis - Installation guide for Swift Package Manager - @thomaspaulmann
- Update documentation to reflect breaking API changes - @mjarvis
- Clarify error message on concurrent usage of ReSwift - @langford
Released: 11/12/2016
Breaking API Changes:
- Dropped support for Swift 2.2 and lower (#157) - @Ben-G
API Changes:
- Mark
Store
asopen
, this reverts a previously accidental breaking API Change (#157) - @Ben-G
Other::
- Update to Swift 3.0.1 - @Cristiam, @Ben-G
- Documentation changes - @vkotovv
Released: 09/15/2016
Other:
- Swift 3 preview compatibility, maintaining Swift 2 naming - (#126) - @agentk
- Xcode 8 GM Swift 3 Updates (#149) - @tkersey
- Migrate Quick/Nimble testing to XCTest - (#127) - @agentk
- Automatically build docs via Travis CI (#128) - @agentk
- Documentation Updates & Fixes- @mikekavouras, @ColinEberhardt
Released: 06/27/2016
Breaking API Changes::
- Significant Improvements to Serialization Code for
StandardAction
(relevant for recording tools) - @okla
Other::
- Swift 2.3 Updates - @agentk
- Documentation Updates & Fixes - @okla, @gregpardo, @tomj, @askielboe, @mitsuse, @esttorhe, @RyanCCollins, @thomaspaulmann, @jlampa
Released: 03/19/2016
API Changes:
- Remove callback arguments on synchronous dispatch methods - @Ben-G
Other:
- Move all documentation source into
Docs
, exceptReadme
,Changelog
andLicense
- @agentk - Replace duplicated documentation with an enhanced
generate_docs.sh
build script - @agentk - Set CocoaPods documentation URL - (#56) @agentk
- Update documentation for 1.0 release - @Ben-G
Released: 02/20/2016
API Changes:
- Subscribers can now sub-select a state when they subscribe to the store (#61) - @Ben-G
- Rename initially dispatched Action to
ReSwiftInit
- @vfn
Fixes:
- Fix retain cycle caused by middleware (issue: #66) - @Ben-G
- Store now holds weak references to subscribers to avoid unexpected memory management behavior (issue: #62) - @vfn
- Documentation Fixes - @victorpimentel, @vfn, @juggernate, @raheelahmad
Other:
- We now have a hosted documentation for ReSwift - @agentk
- Refactored subscribers into a explicit
Subscription
typealias - @DivineDominion - Refactored
dispatch
forAsyncActionCreator
to avoid duplicate code - @sendyhalim
Released: 01/23/2016
API Changes:
- Pass typed store reference into
ActionCreator
.ActionCreator
can now accessStore
s state without the need for typecasts - @Ben-G Store
can now be initialized with an empty state, allowing reducers to hydrate the store - @Ben-G
Bugfixes:
- Break retain cycle when using middelware - @sendyhalim
Other:
- Update Documentation to reflect renaming to ReSwift - @agentk
- Documentation fixes - @orta and @sendyhalim
- Refactoring - @dcvz and @sendyhalim