Releases: respawn-app/FlowMVI
Releases · respawn-app/FlowMVI
2.5.0-alpha07
- Implemented a new multiplatform sample app for wasm and Android (upcoming desktop and iOS) to showcase main features, integration with decompose, DI setup and lifecycle setup.
- Added a new "queue" property for Undo/Redo to observe changes to the queue
2.5.0-alpha06
- Fix essenty-compose depending on androidx libraries
- Kotlin 1.9.23
- Compose 1.5.10, jetbrains compose 1.6.1
2.5.0-alpha05
- Remember store lifecycle instances to prevent unnecessary recompositions where the value of the lifecycle changes.
2.5.0-alpha04
- Another attempt at fixing Android module aar publication
- Fixed an issue where store would resubscribe on each state change due to
SubscriberLifecycle
not implementing hashcode/equals - Updated readme
Full Changelog: 2.5.0-alpha03...2.5.0-alpha04
2.5.0-alpha03
- Fixed
android-*
artifact publication. The previous version did not contain proper jars for those artifacts - Removed deprecated
android-compose
artifact. You can now just usecompose
- Merged
android-view
andandroid
artifacts - Remove some unnecessary dependencies from
compose
artifact
Full Changelog: 2.5.0-alpha02...2.5.0-alpha03
2.5.0-alpha02
New Features:
- Remote Debugging! A new module family
debugger-*
allows to debug your stores remotely, with a dedicated app provided for Linux, MacOS, Windows. Also, the debugger app is implemented usingFlowMVI
and can be used as a sample app. Debugger setup explained in docs. - Essenty Integration! Two new modules:
essenty
andessenty-compose
provide integration with Decompose and Essenty libraries. Essenty setup explained in docs - New Lifecycle Implementation for store subscription in Compose. The Compose module now provides an interface
SubscriberLifecycle
that has to be provided to thesubscribe
function to subscribe to the store. It also allows integration with Platform lifecycle (when it is made multiplatform) and Essenty lifecycle. - Refactoring of StoreLogging allowed to provide a more robust logging code on all supported platforms. You can now provide your own
StoreLogger
implementation or use the platform one as before. - Wasm support for core, test and compose modules! Also enables missing
js
support for compose module. - Compose 1.6.3
- New flag
atomicStateUpdates
in store builders allows disabling serialization / atomicity of state updates if that is not needed, improving performance.true
by default - Project Icon, banner, and star history
- New overload of
store.subscribe()
that does not require a scope ( awith()
call)
Bug Fixes:
- Fixed file name for
serializeState
function using store name - Fix
Saver
s handling cancellation exceptions - Added a missing overload of
timeTravel
that would create and return the object for the user
Breaking Changes:
- Compose's
subscribe
function now requires the consumer to pass a lifecycle to it as a parameter on all platforms where lifecycle is not supported to prevent the user from mistakenly subscribing to the store without using a properlifecycle
. Lifecycle implementations can be custom, provided via a composition local, or used from an integration module. To maintain a previous behavior on non-Android platforms, pass aDefaultLifecycle
as a parameter to thesubscribe
function. Android users don't have this breaking change. - Store implementations now require a hashcode/equals contract
- When store has actions disabled, it will now throw an
UnrecoverableException
to fail faster and avoid recover plugins - Deprecated
parentStorePlugin
in favor of a simplestore.collect
suspending function. It's much more flexible and allows to merge the incoming state with other data sources - Deprecated
platformLoggingPlugin
as a defaultloggingPlugin
now uses a platform logger by default
What's Changed
- 2.5.0 by @Nek-12 in #40
- 2.5.0-alpha02 by @Nek-12 in #41
Full Changelog: 2.4.1...2.5.0-alpha02
2.4.1
2.4.0
New Features:
- Implemented a plugin testing DSL. The plugin allows invoking store plugin methods directly and observing any side effects the plugin produced. It also embeds and installs the time travel plugin to keep track of any changes.
Library tests are already using the testing dsl. See the tests for some example usages. - New overload for
subscribe
that suspends forever. Useful inside other stores and other places - Logging plugin now logs when it is created and exception stacktraces
joinAll
method forJobManager
with vararg argument- Made
compositePlugin
public. Composite plugin is the underlying implementation of FlowMVI's plugin logic. It is mostly useful in tests and some very rare edge cases. - Updated docs and readme
- Dropped the
rc
suffix as the library is 70% covered by tests and has been in prod for quite some time
Breaking changes
nameByType
has been relocated to a different packageTimeTravelPlugin
no longer implements the plugin interface directly. Instead, it uses aTimeTravel
object and installs a separate plugin when requested. This is to allow storing the time travel object elsewhere and to not leak plugin methods as public API- Same change for
CachePlugin
andUndoRedoPlugin
. Their plugins are now just hooks and theCachedValue
andUndoRedo
are completely separate from the store. - NativeStore for iOS code has been changed to implement
Store
, and some useless methods such ascancel
were removed. Canceling the store now also cancels its scope. To cancel just the subscription job, cancel the one returned fromsubscribe
AbstractStorePlugin
is now deprecated. Base classes are evil! Everything that you could do with the base class you can do with aplugin { }
builder.
Bug fixes:
- Disabled android debug artifacts publishing. FlowMVI does not publish different debug/release configurations
- Removed
reified
parameter fromsavedStatePlugin
builder to allow creating this plugin somewhere else. For example, savers can now be injected, with different savers for testing (NoOpSaver
) and main code:A documentation page is going to be made soon for this functionality.internal class DefaultStoreConfiguration( files: FileManager, private val analytics: Analytics, private val json: Json, ) : StoreConfiguration() { override fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.configure( serializer: KSerializer<S>, ) { /* configure the store builder here without exposing any implementation details*/ install( analyticsPlugin(analytics), kermitLoggingPlugin(), serializeStatePlugin(dir = files.cacheDir, json = json, serializer = serializer) ) } }
Dependencies:
- Kotlin 1.9.22
- Compose: Compiler 1.5.9, compose 1.6.1,
- Coroutines 1.8.0-rc2
- lifecycle 2.7.0
2.3.0-rc
Added a new module: savedstate
The module allows saving the state of the store to a persistent storage.
- Saves the state safely, clears it on exceptions in the store
- Allows providing customizable conditions for saving the state, such as on unsubscription and on state changes
- Supports GZIP compression on JVM and Android
- Supports Android Parcelable
- Supports saving state of a particular type
- Can save partial data (subset of a state)
- Supports kotlinx.serialization
- Supports custom saving logic
- Allows to inject saving logic using DI
Learn more in the documentation: https://opensource.respawn.pro/FlowMVI/#/savedstate