Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: Yarikx/reductor

0.13.2

11 May 13:50

Choose a tag to compare

  • Fixed lost state update when listener dispatches an action onCursors.forEach.
  • Fixed processor to fail on projects without AutoValue in classpath.
Assets2
Loading

0.13.1

12 Jan 12:03

Choose a tag to compare

  • Rebuilt libraries with the latest version of Retrolambda (2.4.0).
    No need to add retrolambda-related proguard rules anymore.
  • For a processor, made a dependency to auto-value compile only.
Loading

0.13.0

02 Jan 21:51

Choose a tag to compare

New Module: ReductorObservable

AddedReductorObservable module that mimicsredux-observable.
This allows to dispatch async actions and do side-effects in a composable way using RxJava.

Loading

0.12.0

17 Dec 19:30

Choose a tag to compare

New feature: Dispatcher and Cursor

Introduced two interfaces, both implemented byStore:

publicinterfaceDispatcher {voiddispatch(Objectaction);}
publicinterfaceCursor<State> {StategetState();Cancelablesubscribe(StateChangeListener<State>listener);}
  • Cursor responsible for retrieving the state and observing updates.
  • Dispatcher responsible for dispatching actions.

That allows you to exposeStore functionality as interfaces to your components.

State mapping

HavingCursor interface, it is possible now to havemap operation similar torx.Observable.map(func).
For that purpose new helper classCursors withmap function was introduced.
Usage example:

Store<AppState>store = ...;Cursor<User>userCursor =Cursors.map(store,state ->state.getUser());//use mapped cursor in componentUserPresenterpresenter =newUserPresenter(userCursor);

Mapped cursors allow your components to depend only on specific substate they need, instead of depending on the whole state, knowing on how to get to particular substate.

Current implementation ofmap will only propagate unique values, so it's more efficient to pass mappedCursor
to upper levels of application.

Other (breaking) changes

  • store.forEach(listener) was moved as static function toCursors.forEach(cursor, listeners);
  • action.getValue(index) now returns generic parameter instead of Object.
Loading

0.11.1

30 Nov 23:57

Choose a tag to compare

Replaced@generated annotation with just a comment

Loading

0.11.0

28 Nov 00:49

Choose a tag to compare

Breaking changes

Middleware can be initialized with Store

NowMiddleware is split into two functional interfaces.
So if old middleware signature was(store, action, nextDisaptcher) => (),
the new one will be(store, nextDispatcher) => (action) => ().
This middleware structure is much closer to original Redux middleware.

New generated Action Creators (experimental)

If@AutoReducer.Action(generateActionCreators = true),
reductor will generateActionCreator interface.
The interface will have the same name as reducer with 'Actions' suffix.
Old generated static nestedActionCreator classes in reducer implementations are no longer supported.

As you may use generated action creators directly, explicitly defining action creator interface is recommended.
However generated action creators can be used to prototype your reducer faster,
and then generated interface can be copied to the source code.

Other

AddedGenerated annotation to all emitted code.

Loading

0.10.0

03 Nov 00:33

Choose a tag to compare

New feature: Action creators

This feature allows defining action creators as interface separately from reducer.
This allows:

  • Separate action definition and reducer handler.
  • Get rid of direct usage of some of the generated code (action creators generated inAutoReducer reducers).
  • Per-action validation forAutoReducer reducers to have the same values as in corresponding action creator.
  • Actions can be "shared" between multiple reducers.
  • One reducer can handle actions from multiple Action creators.

To create an instance of Action creatorActions.from(class) can be used.
Example:interface,
usage.

"Old" action creators inAutoReducer is deprecated but still supported (will be removed in next version).

Other changes

  • Action class now has multiple values (Object[] values instead ofObject value).
  • NewStore methodforEach: similar tosubscribe but propagate initial value immediately.
  • New modulereductor-rxjava2 to observeStore as RxJava2Observable orFlowable.
Loading

0.9.3

11 Oct 11:58

Choose a tag to compare

  • Fix reducer code generation for@CombinedState class with no properties
Loading

0.9.2

11 Oct 10:41

Choose a tag to compare

New Features

  • Big update on@CombinedState.
    Now@AutoValue value classes are supported as combined state!
    Interfaces as combined state are still supported.

Other improvements

Update code generator for@CombinedState reducers.

  • Remove unnecessary state object allocation if all sub-states are the same.
  • Use boxed version of sub-state types in reducer, to remove boxing/unboxing when passing to sub-reducers.
Loading

0.9.1

11 Oct 10:33

Choose a tag to compare

  • Renamereductor-rx maven artifact toreductor-rxjava
  • Updatedrxjava version to 1.2.1
Loading
Previous1
Previous

[8]ページ先頭

©2009-2025 Movatter.jp