Skip to content

0.22.0

Compare
Choose a tag to compare
@mluisbrown mluisbrown released this 20 Jul 18:24
· 519 commits to master since this release

This release brings this fork up to date with the upstream library (finally). It was a tricky one. It was possible to bring over most, but not all, of the performance improvements from the upstream TCA. The ReactiveSwift limitation of not allowing reentrant Signals (which I hope will soon be fixed) is the main reason that not all the performance improvements were able to be migrated.

Note: there is a minor breaking change in this release which is that the parameter names for Effect.throttle (now public) and Effect.debounce have been changed to match their equivalents in the upstream repo.

From TCA 0.19.0:

  • Added: a new overload of Reducer.pullback for working with enum-based state. It uses a case path instead of a writable key path for extracting and embedding state for a particular enum case.
  • Added: a new SwitchStore view for converting stores on enum state into stores on individual enum cases (thanks @lukeredpath for sketching out the original implementation).
  • Changed: Effect.timer now calls cancelInFlight: true under the hood to automatically cancel any in-flight timers with the same cancellable id (thanks @dannyhertz). If you rely on the existing behavior, which allows for timers to interleave and stack on one another, you must manually create these timers using SignalProducer.timer instead before upgrading.
  • Fixed: ForEachStore has been optimized and a crash related to removing rows has been fixed.
  • Fixed: documentation cleanup.
  • Infrastructure: modernized example/demo code, along with assorted fixes (thanks @yimajo, @filblue).

From TCA: 0.20.0

  • Added: Effect.deferred(), for delaying the execution of an effect by a given time (compare to SignalProducer.delay(), which delays merely the delivery of some work that has already been performed). Thanks, @wendyliga.
  • Updated: SwitchStore now supports up to 9 CaseLet views.
  • Performance improvement/fix: the number of times Store.scope's state transform function has been minimized. Previously it was evaluated an extra time, multiplied by downstream scopes.
  • Performance improvement/fix: the number of times ViewStore's duplicate check has been reduced.
  • This change was impossible to implement due to the way ReactiveSwift is implemented internally: Performance improvement/fix: a store publisher will only emit a single state change per synchronous Store.send and asynchronous effect received. This means synchronous effects (returned immediately from a reducer via Effect.init(value:)) will no longer result in extra publisher emissions. If your application previously depended on each of these emissions, use Publisher.receive(on:) to schedule these effects on the next run loop tick.
  • Infrastructure: cleaned up demo apps and documentation; added an Indonesian translation of the README (thanks @wendyliga).

From TCA: 0.21.0

  • As Identified Collections cannot support iOS <13 this library continues to depend on the internal IdentifiedArray, and will do for the foreseeable future. Changed: the Composable Architecture now depends on Identified Collections for IdentifiedArray, which has been rewritten for correctness and performance. There are some breaking changes, which are documented in its release.
  • Changed: Reducer.binding now takes an extract function, not a case path. Case path expressions can still be used, or you can refer to casePath.extract(from:).
  • Changed: TestStore has relaxed its Equatable constraint on Action. It is only required for when TestStore.receives actions from effects.
  • Performance fixed: view stores now perform the minimum number of equality checks necessary (thanks @iampatbrown).
  • Fixed: ViewStore.publisher now emits the current store state, and not the previous state (thanks @maximkrouk, @iampatbrown).
  • Infrastructure: cleaned up recursive case study, web socket case study; added benchmarking target.

From TCA: 0.22.0

  • Added: Effect.throttle can throttle how often its associated action is fed back into the reducer (thanks @kerryknight).
  • This change was not applied, as it forces explicit disposing of any producer of state obtained from a ViewStore, which would be counterintuitive for ReactiveSwift users. Be aware that if a ViewStore is deinitialized, it's producer will no longer emit actions. Fixed: A change in 0.21.0 that prevented store publishers from emitting actions if their view stores were deinitialized. This mainly affected UIKit apps.
  • Fixed: A change in 0.20.0 that could leave an action buffered in the store and emit late (thanks @heyltsjay).