Skip to content

Releases: StevenLambion/SwiftDux

v2.0.1

30 Nov 00:04
v2.0.1
3b0693d
Compare
Choose a tag to compare

Fixes

  • The View.onAppear(dispatch:) method caused duplicate views. #54
  • RunnableActions were incorrectly dispatched to the store's reducer.

v2.0.0

21 Nov 18:09
v2.0.0
0a8c295
Compare
Choose a tag to compare

Deprecated

  • MappedDispatch should be replaced with @Environment(.\actionDisaptcher) to be consistent with Apple's usage. #50
  • MappedState should be replaced with ConnectableView or Connector. #50
  • StateType and IdentifiableState are deprecated in favor of having applications define their own protocol to adhere to. Instead of requiring an opinionated state type, the library uses conditional protocol adherences when necessary. #50
  • onAction(perform:) view modifier is deprecated in favor of using middleware. #50

Changes

  • macOS 11.0 is now required. #50
  • Removed ActionType from the Store<_>'s didChange publisher. #48
  • Connector's internal publishing logic has been moved to StateStorable, so it may be reused elsewhere. #50
  • All actions may now be chained instead of just ActionPlans. #51
  • RunnableAction now returns an AnyPublisher<Action, Never> type instead of an AnyCancellable. #51
  • ActionPlan now requires a publisher to return from async blocks instead of providing a completion closure. #52
  • Middleware now return an optional Action instead of calling next(_:) on the StoreProxy<_>. #52

Added

  • Added concrete StorePublisher in place of using AnyPublisher for store changes. #48
  • Added StateStorable protocol so that there's a shared way to extend the Store<> and StoreProxy<> types. #50
  • Added StateStorable.publish(_:) method as a single place to receive an updatable state object. #50

Removed

  • StateBinder is removed. #48
  • Removed next(_:) from StoreProxy<_>. #52
  • Removed the completion closure from ActionSubscriber. #52

Fixed

  • Fixed type inference with onAppear(dispatch:). #50
  • Fixed a circular dependency in the StoreProxy<_> given to middleware. #52
  • Fixed a bug introduced with iOS 14 that may cause a crash related to the onReceive view modifier. #52

v1.2.4

10 Nov 16:48
Compare
Choose a tag to compare

Fixed

  • Fixed broken type inference in Swift 5.3. #47

v1.2.3

14 Oct 16:36
da16921
Compare
Choose a tag to compare

Changed

  • Replaced the requirement for StateType and IdentifiableState by using conditional, granular constraints where needed. #46
  • NoopAnyStore is now a struct. #44
  • Views can now use protocols that the AppState adheres to to retrieve specific parts of the app state. #44

v1.2.1

13 May 01:06
0858ab1
Compare
Choose a tag to compare

Added

  • View.provideStore(_:as:) To inject a store with a specific type of state. #42

v1.2.0

05 May 00:27
301cf38
Compare
Choose a tag to compare

Changed

  • ActionBinder can now bind actions to callable functions. #40, #38
  • Replaced the old internal state connection API with a faster and simpler implementation. #39

Removed

  • Removed Connectable API in favor of ConnectableView due to incompatibilities with the new internal, reference-free implementation. #39

v1.1.0

11 Apr 20:04
855f294
Compare
Choose a tag to compare

Changed

  • Loosened the adherence to StateType at the Store level. #36
  • Simplified ActionDispatcher API by moving the proxy functionality to OnActionViewModifier. #32
  • Provided a more consistent Store API between reducers and middleware. #33
  • ActionDispatcher can now be called as a function. #32
  • MappedDispatch injects an ActionDispatcher instead of a function. #32
  • Modified the implementation of action plans to make it easier to include 3rd party ones. #36

Added

  • Added ActionBinding<> to replace the Equatable extension on Binding<>. #30

Removed

  • onAppearAsync and onDisappearAsync. #36

v1.0.1

23 Jan 15:21
3af68b4
Compare
Choose a tag to compare

Added

  • ConnectableView as a convenient wrapper over Connectable #27

v1.0.0

22 Jan 13:29
001d5d8
Compare
Choose a tag to compare

This marks the 1.0.0 release of the library. The API will be stabilized moving forward.

Fixed

  • PersistStateMiddleware would save the state when the StoreAction<_>.reset was dispatched. #24
    • It no longer saves the state when the store is reset.
  • Connectable.updateWhen would stop a view from updating from its own dispatched actions. #24
    • If the method is implemented, both it and any dispatched actions will cause an update.
  • Connectable.updateWhen would fail to work in some cases when the first call returned true. #24
    • Returning true using any possible implementation will now work.

Changed

  • State is now required to be equatable. #26
  • Middleware is now a protocol type. #25
  • StoreProxy.state is now a non-optional type. #24
  • Store, ActionDispatcher, and StatePersistor no longer adhere to Subscriber. #24
  • Store.didChange is now an AnyPublisher<Action, Never>. #24
  • PersistStateMiddleware now debounces for 1 second by default. #24
  • PrintActionMiddleware now accepts a new filter block. #24
  • onAppearAsync and onDisappearAsync are deprecated. #24
    • These were need to workaround a bug in a pervious beta of iOS 13. #24

Added

  • ActionPlan has a new init block that accepts an AnyCancellable to support ActionSubsriber, #24
  • ActionSubscriber to dispatch actions from a publisher. #24
  • PersistSubscriber to persist state from a publisher. #24
  • StoreProxy.done for use in action plans to tell the proxy that it has completed. #24
  • TypedMiddleware and HandleActionMiddleware. #25

v0.12.1

11 Jan 19:40
8ad2062
Compare
Choose a tag to compare

Fixed

  • Inconsistency with onMove(_:_:) method of OrderedState<_> #21

Added

  • StateBinder API to create 2-way bindings between a state value and an action. #22