Skip to content

Releases: respawn-app/FlowMVI

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

1.1.4: Compose 1.4, javadoc / sources publishing for android

04 Apr 07:51
1.1.4
73af01f
Compare
Choose a tag to compare

What's Changed

  • Docs, js support by @Nek-12 in #12
  • Android Javadocs / source sets + update dependencies by @Nek-12 in #14

Full Changelog: 1.1.3...1.1.4

1.1.3: Deps ugrade, Javadoc publishing

16 Mar 08:42
ca76341
Compare
Choose a tag to compare

What's Changed since 1.0:

  • 1.0.0-alpha01: Safe state update API. by @Nek-12 in #3
  • 1.0.0-alpha02 by @Nek-12 in #4
  • 1.0.0 alpha03: New ComposeScreen dsl by @Nek-12 in #5
  • 1.0.0-alpha04: Bring back return type of withState, lambda fixes by @Nek-12 in #6
  • 1.0.0-alpha04 (2) by @Nek-12 in #7
  • 1.0.0-alpha05 by @Nek-12 in #8
  • Add a Codacy badge to README.md by @codacy-badger in #9
  • Multiplatform compatibility + pro.respawn namespace by @Nek-12 in #10
  • 1.1.3: Deps upgrade by @Nek-12 in #11

Full Changelog: 0.2.6...1.1.3

1.0.0-alpha05: Configuration of ActionShareBehavior

10 Dec 13:27
fcbc8dd
Compare
Choose a tag to compare

Breaking changes:

  • ActionShareBehavior is now a sealed class, not an enum

1.0.0-alpha01: Safe state update and new API

23 Nov 19:37
5565b17
Compare
Choose a tag to compare

What's Changed

  • 1.0.0-alpha01: Safe state update API. by @Nek-12 in #3

There are a lot of changes in this release. It's currently experimental and the API may change further.
I've decided to implement a synchronous first-in-first-serve state update api, and because of that, all the APIs that exposed current state without properly handling the parallelism of updates were removed.

Breaking changes:

  • Removed currentState. Use withState() instead.
  • Added withState() function that obtains a current state, then runs the given block while suspending every other client from accessing the state until that block is finished. This is done because by obtaining state and then mutating it, you inherently introduce race conditions to your code, and now the management of that is being done out of the box by the library. Previously, you had to keep track of those yourself
  • State can now still be obtained and assigned as the state property, but these APIs are considered delicate and may be removed in the future if no use cases for them are found.
  • added new inline functions updateState and withState that work differently from the withState we were used to use. withState now operates on a state, but does not change it, and updateState updates the state with the return value of its block. Proper contracts were implemented for them.
  • There are now new inline functions for updateState and withState that work the same as the previous withState function - if state does not match given type, the block isn't executed and state is not updated.
  • reduce() now has no return value. This is because users of the library don't always need to update the state. Often an intent reduction results just in an action or other processing being done.
  • removed set(state) from the api
  • launchForState is now called launchRecovering and does not require a state return value. It's now exposed via store and it's reducer scope
  • Introduced new typealiases for lambdas of recover and reduce
  • The preferred way of creating and launching the store is lazyStore() (not launched) and launchedStore() (created and launched on first access)
  • MVIIntentScope no longer implements CoroutineScope but rather has a scope property
  • KMM migration plans are set in place. The library will get to the beta when the KMM migration is done for the core module.
  • Tests are now fully passing. Code coverage is on its way.
  • Store.launch() is now Store.start()
  • MVIIntentScope no longer implements MVIProvider to not let users abuse some functions like sending intents out of the reduce block anymore.
  • All deps were updated to latest stable versions, namely kotlin (1.7.21) and compose (1.3.1 with compiler 1.4.0-alpha02)

Full Changelog: 0.2.6...1.0.0-alpha01

0.2.6-alpha

07 Oct 08:57
dfa24fd
Compare
Choose a tag to compare
0.2.6-alpha Pre-release
Pre-release

What's Changed

Full Changelog: 0.2.5...0.2.6

v0.2.5-alpha

07 Jun 19:15
efeec99
Compare
Choose a tag to compare
v0.2.5-alpha Pre-release
Pre-release
Merge pull request #1 from Nek-12/ci

Configured CI