reduceWithState method

  1. @Deprecated("This is deprecated and will be removed soon, " "because it's more difficult to use than it seems. " "Unless you completely understand what you're doing," "you should only used it with sync reducers.")
FutureOr<St?> reduceWithState(
  1. Store<St> store,
  2. St state
)

Nest state reducers without dispatching another action. Example: return AddTaskAction(demoTask).reduceWithState(state);

Implementation

@Deprecated("This is deprecated and will be removed soon, "
    "because it's more difficult to use than it seems. "
    "Unless you completely understand what you're doing,"
    "you should only used it with sync reducers.")
FutureOr<St?> reduceWithState(Store<St> store, St state) {
  setStore(store);
  _store.defineState(state);
  return reduce();
}