How to use the usm.moduleStatuses.initial function in usm

To help you get started, we’ve selected a few usm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unadlib / usm / packages / usm-redux / src / core / reducers.ts View on Github external
  return (state = initialValue || moduleStatuses.initial, { type }): State => {
    switch (type) {
      case types.init:
        return moduleStatuses.pending;
      case types.reset:
        return moduleStatuses.resetting;
      case types.initSuccess:
        return moduleStatuses.ready;
      default:
        return state;
    }
  };
}

usm

Universal state model

MIT
Latest version published 2 months ago

Package Health Score

63 / 100
Full package analysis