ReactiveCocoa Loop Versions Save

Composable unidirectional data flow with ReactiveSwift.

2.0.0

3 years ago

This is the first stable release of Loop 2.0. It requires Swift 5.2, and supports CocoaPods, Carthage and Swift Package Manager (tools version 5.2).

API consolidation

Introduce Loop, a thread-safe implementation as the source of truth for your unidirectional data flows.

It is renamed from the v1.0 FeedbackLoop, and merged with features from the experimental compositional Store. Note that Loop now starts as it is initialised — start() and stop() previously provided by FeedbackLoop are now no-op and are officially deprecated.

API changes

New feedback variants

Loop now provides two new feedback variants:

  • whenBecomesTrue(_:effects:)

    Given a predicate over the loop state, it spawns an effect with a snapshot of the state, when a positive edge is observed from the the predicate output. It automatically cancels any outstanding effect if a negative edge is observed.

  • firstValueAfterNil(_:effects:)

    Given a transform over the loop state, it spawns an effect with the first non-nil value from the transform output. It automatically cancels any outstanding effect if any nil is observed.

Deprecated feedback variants

The aforementioned feedback variants are intended to replace predicate: as a standard offering in Loop.

We believe that the new variants provide more specialised semantics for the purpose of application development. Most importantly, from the production experience of Loop observed, we are confident that these are more flexible defaults to adapt to the variety in state modelling complexity (e.g., from sum type FSM, to product of sums).

Scoped loops

You can now create scoped loops through Loop.scoped to create lens of your root loop for injecting into different areas of your application.

Note on the scheduler-bound loop API

The scheduler-bound loop API — instantiated via Property.init or SignalProducer.system — has been deprecated since Loop 1.0. They may be removed in the next major release.

2.0.0-beta3

3 years ago

This is the third beta release of Loop 2.0. It requires Swift 5.2, and supports CocoaPods, Carthage and Swift Package Manager (tools version 5.2).

Changes

See the release note for Loop 2.0 beta 1 for important changes in 2.0.

  • Fixed an issue of firstValueAfterNil not starting the effect, when the the supplied (State) -> U? transform does yield non-nil value for the initial state. (#22)
  • Fixed an issue of whenBecomesTrue not starting the effect, when the the supplied (State) -> Bool predicate does pass with the initial state. (#22)
  • Fix a scenario where reentrant calls to Loop.send(_:) should work but deadlock instead. (#23)

2.0.0-beta2

3 years ago

This is the second beta release of Loop 2.0. It requires Swift 5.2, and supports CocoaPods, Carthage and Swift Package Manager (tools version 5.2).

Changes

See the release note for Loop 2.0 beta 1 for important changes in 2.0.

  • Fixed a rare scenario in which enqueued events might be left unprocessed . (#21)
  • Fixed the pod spec for not requiring ReactiveSwift 6.2 or above. (#20)

2.0.0-beta1

3 years ago

This is the first beta release of Loop 2.0. It requires Swift 5.2, and supports CocoaPods, Carthage and Swift Package Manager (tools version 5.2).

API consolidation

Introduce Loop, a thread-safe implementation as the source of truth for your unidirectional data flows.

It is renamed from the v1.0 FeedbackLoop, and merged with features from the experimental compositional Store. Note that Loop now starts as it is initialised — start() and stop() previously provided by FeedbackLoop are now no-op and are officially deprecated.

API changes

New feedback variants

Loop now provides two new feedback variants:

  • whenBecomesTrue(_:effects:)

    Given a predicate over the loop state, it spawns an effect with a snapshot of the state, when a positive edge is observed from the the predicate output. It automatically cancels any outstanding effect if a negative edge is observed.

  • firstValueAfterNil(_:effects:)

    Given a transform over the loop state, it spawns an effect with the first non-nil value from the transform output. It automatically cancels any outstanding effect if any nil is observed.

Deprecated feedback variants

The aforementioned feedback variants are intended to replace predicate: as a standard offering in Loop.

We believe that the new variants provide more specialised semantics for the purpose of application development. Most importantly, from the production experience of Loop observed, we are confident that these are more flexible defaults to adapt to the variety in state modelling complexity (e.g., from sum type FSM, to product of sums).

Scoped loops

You can now create scoped loops through Loop.scoped to create lens of your root loop for injecting into different areas of your application.

Note on the scheduler-bound loop API

The scheduler-bound loop API — instantiated via Property.init or SignalProducer.system — has been deprecated since Loop 1.0. They may be removed in the next major release.

1.0.0

4 years ago

The community fork of ReactiveFeedback has been renamed to ReactiveCocoa Loop.

Snippets for updating your dependency declarations:

// Package.swift
.package(url: "https://github.com/ReactiveCocoa/Loop", from: "1.0.0")

// Cartfile
github "ReactiveCocoa/Loop" ~> 1.0

// Podfile
pod "Loop", "~> 1.0"

0.9.0

4 years ago
  1. Fixed a race condition in the new synchronous FeedbackLoop. https://github.com/babylonhealth/ReactiveFeedback/pull/58

  2. Fixed a bug in the async Property feedback loop API, causing the reducer not runnig the specified Scheduler. https://github.com/babylonhealth/ReactiveFeedback/pull/57/

  3. Experimental support for feedback & reducer composition. https://github.com/babylonhealth/ReactiveFeedback/pull/49