Releases: freeletics/FlowRedux
Releases · freeletics/FlowRedux
0.10.0
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 collectingFlowReduxStateMachine.state
Breaking API change:
FlatMapPolicy
is renamed toExecutionPolicy
#177
Fix:
- fix a crash caused by resubscribing to a state machine (introduced in 0.9.0)
0.9.0
0.8.0
New:
- Introduced
onActionEffect
,onEnterEffect
andonCollectWhileInStateEffect
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
andon<Action>
to pass in function references without the need of specifyingFlatMapPolicy
or explicitly use named argument for handler. #186
0.7.0
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
. UseinState<RootClassFromStateHierarchy> { collectWhileInState(flow) {... } }
instead to get to the same endresult.
Kudos to @gabrielittner 🎉
0.6.0
0.5.0
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 asonEnter{ ... }
. It replacessetState{ ... }
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
- 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
New
- Added
setState (runIf: (State) -> Boolean ) { ... }
where inrunIf
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 ininState
- Added a generic way to define
inState(isInState = (State) -> Boolean) { ... }
in addintion toisInState<State>
.
Breaking changes
- Renamed
observeWhileInState
tocollectWhileInState()
#63 - Renamed
observe()
tocollectInAnyState()
- Renamed type alias
StateAccessor
toGetState
Improvement
- Don't package test libraries in jvm dsl jar artifact #54
0.2.1 - Multiplatform Release
- Multiplatform release for iOS, jvm, watchOS and TvOS. JavaScript not included yet.
- Renamed
library
artifact toflowredux
- introduces
inState<> { onEnter() }
to DSL - Added a sample app for android and iOS (using SwiftUI).