Skip to content

Releases: freeletics/FlowRedux

0.10.0

27 Oct 10:16
Compare
Choose a tag to compare

New:

  • support for composable child state machines #133
  • Support for Apple Silicon targets #201
  • Added a check that throws an exception if FlowReduxStateMachine.dispatch(action) is called before collecting FlowReduxStateMachine.state

Breaking API change:

  • FlatMapPolicy is renamed to ExecutionPolicy #177

Fix:

  • fix a crash caused by resubscribing to a state machine (introduced in 0.9.0)

0.9.0

20 Oct 20:07
Compare
Choose a tag to compare

Breaking API changes:

  • FlowReduxStateMachine is not using StateFlow anymore. That makes the Statemachine "cold" again. #210

Addition:

  • Turned type alias for DSL lambdas into fun interface #189

0.8.0

25 Aug 14:19
Compare
Choose a tag to compare

New:

  • Introduced onActionEffect, onEnterEffect and onCollectWhileInStateEffect to do some work as a sort of "side effect" without changing the state #129
  • Introduced collectWhileInState(flowBuilder: (Flow<State> -> Flow<Value>) #182
  • Overloads for collectWhileInstate and on<Action> to pass in function references without the need of specifying FlatMapPolicy or explicitly use named argument for handler. #186

0.7.0

02 Aug 15:10
Compare
Choose a tag to compare

A bunch of Bug fixes, please update!

Fixes:

  • #174 : cancel onEnter block if state is left
  • #175 : cancel onAction block if state is left
  • #166 : cancel collectWhileInState block if state is left
  • #169 : Fixed unit tests to run with multithreaded dispatcher

API changes:

  • #171 : Removed FlatMapPolicy from onEnter
  • #167 : Removed collectWhileInAnyState. Use inState<RootClassFromStateHierarchy> { collectWhileInState(flow) {... } } instead to get to the same endresult.

Kudos to @gabrielittner 🎉

0.6.0

21 Jun 15:23
Compare
Choose a tag to compare
  • Some internal improvements mainly around removing Channel and replacing it with MutableSharedFlow #143

0.5.0

12 May 14:58
Compare
Choose a tag to compare

This is a major change and milestone towards 1.0 release

This release contains breaking changes

  • ChangeState is return type for all DSL blocks such as onEnter{ ... }. It replaces setState{ ... } to trigger state transitions. Furthermore, this allows us to easily write functions that can be unit tested more easy compared to how it worked before (setState and 'getState'). A function signature i.e. to handle an action looks as follows:
    fun handleAction(action : MyAction, stateSnapshot : MyState) : ChangeState<State>
  • getState' has been removed as it's not needed anymore because ChangeState` replaces it.
  • inStateWithCondition replaces `inState(condition : (State) -> Boolean)' to avoid issues with overloads and type erasure on jvm.

0.4.0

01 Oct 19:48
Compare
Choose a tag to compare
  • Compiled with Kotlin 1.4.10 (binary compatible with Kotlin 1.4.0)
  • Breaking: Artifact coordinates did change:
    For multiplatform are from now on
implementation 'com.freeletics.flowredux:flowredux:0.4.0'
implementation 'com.freeletics.flowredux:dsl:0.4.0'

and for jvm:

implementation 'com.freeletics.flowredux:flowredux-jvm:0.4.0'
implementation 'com.freeletics.flowredux:dsl-jvm:0.4.0'

This is more streamlined now with kotlin multiplatform library packaging best practices.

0.3.0

14 Feb 16:08
Compare
Choose a tag to compare

New

  • Added setState (runIf: (State) -> Boolean ) { ... } where in runIf you can specify if this setState block should actually run or not. Per default it will only run if you are still in the state specified in inState
  • Added a generic way to define inState(isInState = (State) -> Boolean) { ... } in addintion to isInState<State>.

Breaking changes

  • Renamed observeWhileInState to collectWhileInState() #63
  • Renamed observe() to collectInAnyState()
  • Renamed type alias StateAccessor to GetState

Improvement

  • Don't package test libraries in jvm dsl jar artifact #54

0.2.1 - Multiplatform Release

02 Feb 13:28
Compare
Choose a tag to compare
  • Multiplatform release for iOS, jvm, watchOS and TvOS. JavaScript not included yet.
  • Renamed library artifact to flowredux
  • introduces inState<> { onEnter() } to DSL
  • Added a sample app for android and iOS (using SwiftUI).

0.1.0

24 Oct 07:24
613312e
Compare
Choose a tag to compare

First official release targeting JVM only (Multiplatform coming soon). Contains

  • FlowrRedux: the core library (think of it as the low level API)
  • FlowRedux-DSL: A fluend DSL to describe your ReduxStore (think of it as the high level API)l