withLogging<T> static method

OpinionatedStore<T> withLogging<T>(
  1. T initialState
)

Create a store with logging

Implementation

static OpinionatedStore<T> withLogging<T>(T initialState) {
  return OpinionatedStoreBuilder<T>(initialState)
      .withMiddleware((old, new_) {
        Logger.debug('State changed', {'old': old, 'new': new_});
      })
      .build();
}