// @flow

import type { State, Action } from './types';

import { initialState } from './selectors';

const reducer = (state: State = initialState, action: Action): State => {
  switch (action.type) {
    case 'AWS_COGNITO_INIT':
      return { ...state, ...initialState };

    case 'AWS_COGNITO_LOG_IN':
      return { ...state, isAuthenticating: true };

    case 'AWS_COGNITO_LOG_OUT':
      return { ...initialState };

    case 'AWS_COGNITO_SET_STATE':
      return { ...state, ...action.payload };

    default:
      return state;
  }
};

export default reducer;

@@ -410,32 +410,122 @@
 nitialState %7D;%0A%0A
+    case 'AWS_COGNITO_RESET_STATE':%0A      return %7B ...initialState, ...action.payload %7D;%0A%0A
     case 'AWS_CO

Add mising reducer case to handle resetState