Skip to content

Releases: respawn-app/FlowMVI

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

2.0.0-beta03

21 Aug 16:44
5636ce5
Compare
Choose a tag to compare
  • Made MVIComposable.consume() subscribe to the store to fix a race problem that resulted from delegation of values. This is a breaking change because you are no longer able to omit the consume call even if your store has side effects disabled.
  • Fixed some API issues
  • Renamed MVIView (the new one from android module) to Subscriber because that interface is actually needed for multiplatform code as well. As previously, you are free to not use the convenience interfaces
  • Added an ImmutableStore to limit the API surface (reserved for future use)

Full Changelog: 2.0.0-beta02...2.0.0-beta03

2.0.0-beta02

17 Aug 14:33
029814f
Compare
Choose a tag to compare
  • Added an undo/redo plugin
  • Added a job manager plugin
  • Made consume / passthrough behavior for intents configurable for reduce plugin
  • Updated sample app with new plugins
  • Added more tests

If you are migrating from FlowMVI 1.x, please see change logs for the 2.0.0-alpha01 version before upgrading to know how to deal with breaking changes, and the migration guide on our docs website.

2.0.0-beta01

16 Aug 18:47
a99b526
Compare
Choose a tag to compare
  • Added platformLoggingPlugin which chooses the log stream specific to the platform
  • Added a new artifact - test which contains a simple dsl for unit-testing stores
  • Added a configurable amount of subscribers to whileSubscribed plugin
  • Added more supported platforms - androidNative, watchOS, tvOS, linuxArm64

If you are migrating from FlowMVI 1.x, please see change logs for the 2.0.0-alpha01 version before upgrading to know how to deal with breaking changes, and the migration guide on our docs website.

2.0.0 alpha 01

09 Aug 05:48
2.0.0-alpha01
85e29c6
Compare
Choose a tag to compare
2.0.0 alpha 01 Pre-release
Pre-release

The library has been rewritten from the ground up!

  • Bad news: Almost everything from FlowMVI 1.0 has been deprecated, including MVIViewModel
  • Good news: This release enables insanely powerful new features, extensive customization and adds a plugin-based system with a rich & clean DSL. You won't ever need to subclass anything anymore, including View Models.

Most of the deprecated things were simple renames or package changes, so the migration should be easy by simply running an IDE action and there should be very few compile-time errors. A detailed guide on the rest of the migration is on our documentation website.

Here's a full list of everything new added:

  • Kotlin 1.9.0 full support. Also updated compose to 1.5.0-rc.
  • Completely new StorePlugin system with builders for various plugins
  • Added multiple prebuilt plugins:
    • Reduce is now a plugin,
    • Recover is now a plugin,
    • Init Plugin,
    • WhileSubscribed plugin,
    • SavedState plugin,
    • Logging plugin,
    • TimeTravel plugin
  • Deprecated MVIViewModel
  • Added MVVM+ style stores with Lambda Intents. More info in the documentation.
  • New store capabilities - maximum size for intents, suspending intents (call emit to suspend), buffer overflow for intents
  • Added support for parallel intents
  • New action share behavior: Disabled, to throw if side effects are not allowed
  • Context receivers are now supported on JVM
  • Split the library into many functional interfaces to make stores modular and simple
  • Shuffled a lot of classes around to their new packages like api and dsl
  • Removed StoreProvider and added a similar interface named Container
  • Deprecated the collectOnLifecycle APIs because they have been added to Compose foundation
  • Target SDK 34
  • New StoreViewModel that can be used as a container for the store to avoid subclassing on Android and reuse stores.
  • Made State / Intent / Action comparable, they now must implement hashcode and equals. Easiest way to generate these is to use data class and data object
  • send(Action) is now suspending to enable plugins interception. This may be the only compilation error you will face
  • Store can now be closed manually with the AutoCloseable interface
  • Added various runtime validations and debuggable property
  • Added tests to achieve 60+% coverage of the core module
  • Improve performance by making functions inline
  • Deprecated launchRecovering. Store now handles exceptions automatically
  • Deprecated MVISubscriber, MVIProvider, ReducerScope, MVIStore, Reducer and replaced them with their new counterparts
  • Documentation is now versioned
  • Completely rewritten documentation is expanded with new guides

This release has never been run on a production application yet, so we advise waiting for alpha 02 or 03 until you update.

1.2.0-alpha01: Multiplatform API + some API changes

04 Apr 08:03
481d68c
Compare
Choose a tag to compare

This release contains some breaking changes:

  • Renamed MVIStore's initialState -> initial to achieve parity with other builders
  • Reducer renamed to Reduce because Reducer is now a fun interface that can be used to compose reducing logic in the future
  • Made ReducerScope implement CoroutineScope instead of having a scope property for cleaner coroutine launching
  • MVIViewModel no longer implements ReducerScope for less error-prone API.

Other changes:

  • Added a FlowMVIDSL annotation for cleaner autocompletion from the IDE.
  • Added a StoreProvider abstract class to have a place where to put the business logic when code is framework-independent. This change will allow users of the library to implement multiplatform stores using an OOP-based approach (i.e. inheritance and classes)
  • Updated Sample App to feature the new StoreProvider, and written a Koin DSL

This release is experimental for now until the API is tested properly

What's Changed

  • 1.2.0: Implemented an API to make business logic Multiplatform / Framework-independent by @Nek-12 in #15
    Full Changelog: 1.1.4...1.2.0