Skip to content

@data-client/[email protected]

Compare
Choose a tag to compare
@github-actions github-actions released this 13 Oct 10:27
· 126 commits to master since this release
5a5c95f

Patch Changes

  • #3238 28b702d Thanks @ntucker! - Update test docs link

  • #3244 109c922 Thanks @ntucker! - Add actionTypes without _TYPE suffix

    (Not breaking - we keep the old actionTypes name as well.)

    import type { Manager, Middleware } from '@data-client/react';
    import { actionTypes } from '@data-client/react';
    
    export default class LoggingManager implements Manager {
      middleware: Middleware = controller => next => async action => {
        switch (action.type) {
          case actionTypes.SET_RESPONSE_TYPE:
            console.info(
              `${action.endpoint.name} ${JSON.stringify(action.response)}`,
            );
          default:
            return next(action);
        }
      };
    
      cleanup() {}
    }
    import type { Manager, Middleware } from '@data-client/react';
    import { actionTypes } from '@data-client/react';
    
    export default class LoggingManager implements Manager {
      middleware: Middleware = controller => next => async action => {
        switch (action.type) {
          case actionTypes.SET_RESPONSE:
            console.info(
              `${action.endpoint.name} ${JSON.stringify(action.response)}`,
            );
          default:
            return next(action);
        }
      };
    
      cleanup() {}
    }
  • Updated dependencies [109c922]: