Releases: beyondeye/Reduks
New release for kotlin 1.2
updated dependencies:
kotlin: 1.2
kotlin coroutines: 0.20
android gradle plugin: 3.0.1
android support lib: 27.0.2
first beta for new reduks 3.x
first beta for new reduks 3.x
ReduksBus API overhaul
New features
Reduks bus api vastly improved: see the sources and updated Readme
Breaking changes
in ReduksBus
api:
unsubscribeAllBusDataHandlers
renamed toremoveAllBusDataHandlers
in Reduks
interface
- removed
storeSubscriber
andstoreSubscription
fields - added instead maps
storeSubscriptionsByTag
andbusStoreSubscriptionsByTag
that can be accessed by tag - added 'reduks' interface extensions methods for more easily managing store subscriptions:
subscribe
that automatically
store subscription with tag, andunsubscribe
that retrieve a subscription by tag and unsubscribe it
Dependencies updated
- kotlin : 1.0.6
- android support lib: 25.1.0
Reduks modules overhaul and more
Better actions / better ActionWithContext
support:
- added standard
INIT
action, that is dispatched whenreplaceReducer()
is called and is used as default StartAction inReduksModule
definition andSingleModuleReduksActivity
- Create actions with context with
..
operator:ctx1..SomeAction()
create anActionWithContext
withctx1
asReduksContext
andSomeAction()
as wrapped action. If the ctx1 is actually empty, then the '..' operator returns the unwrapped action instead. - added action matchers
matchA
andisA
forActionWithContext
in awhen
expression. seeActionWithContextTest
for examples:
Reduks modules ovehaul:
- Performance of Reduks modules greatly improved and code greatly simplified: method count for core reduced by almost 20%
Reduks
interface new extension functionssubStore
,subState
,subDispatcher
for making it easier to interact with substores in multimodule stores- added support for default
ReduksContext
equal to the substate classsimpleName
for making it easier to define multimodule stores - defining a
StoreSubscriberBuilder
and an initial action is now optional when defining Reduks modules (the default INIT start action will be used)
Integration of Reduks Bus with modules:
- for a multimodule store, the reduks bus of the first substate that make a bus available will be used as the bus for the multimodule store
Various other improvements:
dispatch()
andstate
are now extension functions forReduks
interface- added
StoreSubscriberFn
with second argument that is an automatically definedSelectorBuilder
object that you can use for creating your selectors to use in the StoreSubscriber. - removed
StoreCreator
argument ininitReduks
forReduksActivity
and defined instead a separate
method inReduksActivity
interface for providing thestoreCreator
(for better integration with Reduks modules)
Bug fix:
- Removed StartKovenant/StopKovenant from KovenantReduksActivity
Dependencies updated:
- kotlin : 1.0.5
- kovenant : 3.3.0
- android support lib: 24.2.1
- gson :2.8.0
simplified StoreCreator interface and better integration of StoreCreator with middlewares
New features:
- new extension functions for
StoreCreator
, for adding middlewares (withMiddlewares()
) or store enhancers (enhancedWith()
), also allow better integration of middlewares and store enhancers in Reduks modules. - StoreCreator interface has been greatly simplified, and now better match the original Reduxjs implementation while mantaining all Reduks features
Breaking changes:
ofType()
andstoreStandardMiddlewares
property removed fromStoreCreator
interface
Reduks bus and Immutable/Persistent Collections
New features:
- Reduks Bus Store Enhancer and integration with persistent collections. See README for documentation
Breaking changes:
- builder functions name changed with 'Fn' suffix added
Middleware
->MiddlewareFn
Reducer
->ReducerFn
StoreEnhancer
->StoreEnhancerFn
StoreSubscriber
->StoreSubscriberFn
StoreSubscriberBuilder
->StoreSubscriberBuilderFn
Thunk
->ThunkFn
- 'I' prefix removed from interface names
IMiddleware
->Middleware
IReducer
->Reducer
IStoreEnhancer
->StoreEnhancer
IStoreSubscriber
->StoreSubscriber
IStoreSubscriberBuilder
->StoreSubscriberBuilder
bug fix: subscribe with lambda did not return subscription
see pull #13
removed all remaining java code (interfaces) in core
New features:
- now Reduks core is pure Kotlin, with no Java code or dependency.
Breaking changes:
-
none unless you referenced explicitly the Java interfaces for
Middleware
Reducer
StoreEnhancer
StoreSubscriber
StoreSubscriberBuilder
StoreSubscription
NextDispatcher
.
With explicit reference I mean explicit reference to them as a type. But as long as you used them in code to define your objects, you should be fine, because new builder functions have been introduced that results in exactly the same API.
If you need to reference these interfaces directly, note that they have been renamed, and now have an 'I' at the beginning of their names. E.g. Middleware
is now IMiddleware
.
These has been done in order to preserve the current API, from the end user perspective.
NextDispatcher
interface has been completely removed: define directly functions with signature (Any)->Any
instead
change StoreSubscriber interface to match original redux
Breaking change:
- StoreSubscriber no more receive the new state as argument. need to fetch the new state directly from store.state
(like in original redux). solves issue #8
support for StandardAction
New features:
- support for StandardAction (see updated readme) (solves issue #5)
- new Store extension methods
dispatch_a
anddispatch_sa
for checking type of action at compile time - new Store extension method
subscribe
that takes as argument a lambda instead of a StoreSubscriber object