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<CoreState?> reduceWithState(
  1. Store<CoreState> store,
  2. CoreState state
)
inherited

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();
}