Skip to content

Releases: respawn-app/FlowMVI

2.2.1-rc

13 Dec 16:02
78601c6
Compare
Choose a tag to compare
  • Fixed recoverPlugin not catching all errors
  • Kotlin 1.9.21
  • Fixed package name for some android plugins

2.2.0-rc

02 Dec 18:42
afc3526
Compare
Choose a tag to compare

New features

  • Compose multiplatform support for android, ios and jvm (desktop). New module compose replaces android-compose
  • New versioning schema (without rc candidate numbers) to indicate the library as a whole being RC

Bugfixes

  • Fixed logging plugin reporting invalid subscription counts
  • Fixed awaitSubscribers plugin deadlocking the store
  • Improved internal store performance by inlining some code

Breaking Changes

  • android-compose artifact is deprecated entirely.
    To migrate, please replace "android-compose" with "compose" in your gradle dependency definition, and then run a project-wide replace action:
    pro.respawn.flowmvi.android.compose. -> pro.respawn.flowmvi.compose.
    No other actions should be necessary.

2.1.0-rc03

01 Dec 12:34
2.1.0-rc03
2fd1b67
Compare
Choose a tag to compare

This is an important release with fixes, performance improvements and a better API.

Breaking changes

  • JobManager object now has a type for the Job's key. If you used string keys before, just add a string type: JobManager<String>
  • onSubscribe and onUnsubscribe are now suspending. Suspending either of the callbacks will make other updates to the subscription count wait for the completion of the job
  • Subscribers will no longer wait for the store to start. This means there are no guarantees anymore that all of the onSubscribe/onUnsubscribe callbacks will be invoked and in a given order. This is because due to asynchronous systems and frameworks such as Compose, the subscription event may come before the previous subscriber unsubscribes.
  • onSubscribe's "subscriber scope" parameter has been removed. We haven't found any use cases for that other than influencing the subscription lifecycle from inside the store, which is a leak of responsibility and creates unexpected behavior. You'll likely want to simply remove the "_" from the _, subs -> lambda you were using and that will be it.
  • Immutable store interface is no longer autocloseable to better align with the api

New Features

  • ImmutableStore interface is now fully supported. This interface is useful for MVVM+ style declarations to prevent leaking the store internals to subscribers of the store
  • Undo/Redo can now be configured to clear the queue on exception. true by default
  • New plugin - parentStore - will allow a store to connect to another store, becoming a subscriber of it. The subscription will follow the lifecycle of the child store subscribers (whileSubscribed is used under the hood)
  • New EmptyState object as a placeholder for stores with no state

Bugfixes

  • Fixed an issue where store's lifecycle owner would not restart the subscription job when it changes. This happened with, for example, the navbackstack entry's lifecycle in compose
  • Fixed an issue where whileSubscribed would sometimes leak its jobs
  • Fixed subscribe DSL in compose not using Dispatchers.Main.immediate
  • Fixed some infinite loops with recover plugin exception handling
  • Improved performance of subscribe dsl by creating different overloads
  • Kotlin 1.9.20 / compose 1.6.0-beta02

2.1.0-rc02

26 Oct 16:05
cdb03ce
Compare
Choose a tag to compare
  • Fixed a bug that would cause the store to resubscribe every time the state was change
  • Fixed a bug that would start the store with its initial state and not the current one upon entering composition
  • Some performance improvements
  • Fixes to NativeStore API
  • Updated deps (Compose 1.5.4)

P.S. Github messed up the order of releases, so please see RC01 for the previous release

2.0.0-beta08

26 Oct 16:02
ebacf71
Compare
Choose a tag to compare
  • Added a new plugin - disallowRestartPlugin to make the store non-restartable
  • Added a new plugin - cachePlugin to cache the values in store's scope and execute suspending code
  • Updated docs
  • Published an article about the architecture

2.0.0-beta07

26 Oct 16:02
8979755
Compare
Choose a tag to compare
  • Added a new plugin - awaitSubscribers
    This plugin allows the store to suspend its processing until a certain number of subscribers appear.

2.0.0-beta06

26 Oct 16:02
78d0894
Compare
Choose a tag to compare
  • Fix a bug where coroutines launched inside ConsumerScope.consume would not run
  • Optimize recomposition performance by inlining MVIComposable
  • Add an overload to ConsumerScope.consume named Subscribe for better API parity

2.0.0-beta05

26 Oct 16:02
c0e497e
Compare
Choose a tag to compare
  • Changed the name of consumeIntentsPlugin to not be the same as reduce plugin's to allow to use both.

2.1.0-rc01

17 Oct 08:58
b620e53
Compare
Choose a tag to compare

FlowMVI 2.0 is a release candidate! 🎉
We are now successfully using the library in multiple commercial projects.

⚠️ If you are still using FlowMVI 1.0, please update to the latest beta version first as the 1.0 code was removed in RC ⚠️

In this release:

  • Removed FlowMVI 1.0 code from the repository

  • Deprecated MVIComposable. The subscription api used before was error-prone and performance-heavy. There is a leaner, faster and easier approach now to subscribe to the Store:

     val state by store.subscribe { action -> /* ... */ } 
     // or
     val state by store.subscribe() // actions not consumed
     
    // ...
    
     // replace ConsumerScope with this. 
    @Composable 
    fun IntentReceiver<ScreenIntent>.ScreenContent(state: ScreenState) { /* ... */ }

    Store implements IntentReceiver<I> so you can use store as a receiver directly instead of the previously provided ConsumerScope.

  • Deprecated ConsumerScope. It has been replaced by IntentReceiver, as shown above. EmptyScope was replaced by EmptyReceiver. Consult the updated documentation and sample app for usage guidance.

  • Added @Stable markers to MVIState,MVIAction,MVIIntent & IntentReceiver. They are now stable out-of-the-box, even in multiplatform code, which allows you to no longer mark those as @Stable yourself.

  • Fixed a bug that prevented null values from being used in cachePlugin

  • Added missing annotations and inline clauses

  • Bumped version to 2.1.0-rc01 to fix dependency resolution conflicts

New Contributors

Full Changelog: 2.0.0-beta09...2.0.0-rc01

2.0.0-beta09

20 Sep 18:22
efc9f81
Compare
Choose a tag to compare
  • Update dependencies